diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-05-07 21:59:31 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-05-07 21:59:31 +0000 |
commit | c4b3a7a1d771a515dbd6d695275be92e6da3eb81 (patch) | |
tree | 3cb4afebd256a41e3f4b3530e16d662acce7e367 /llvm/lib/Target/TargetRegisterInfo.cpp | |
parent | 8b7f01c6a10c5c8bebb82f214bcf3bc6c82b2607 (diff) | |
download | bcm5719-llvm-c4b3a7a1d771a515dbd6d695275be92e6da3eb81.tar.gz bcm5719-llvm-c4b3a7a1d771a515dbd6d695275be92e6da3eb81.zip |
Fix bug in TRI::getCommonSuperRegClass().
Test cases for this code are coming. It is not used for anything yet.
llvm-svn: 156327
Diffstat (limited to 'llvm/lib/Target/TargetRegisterInfo.cpp')
-rw-r--r-- | llvm/lib/Target/TargetRegisterInfo.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Target/TargetRegisterInfo.cpp b/llvm/lib/Target/TargetRegisterInfo.cpp index 532e6d23189..4acbe729d74 100644 --- a/llvm/lib/Target/TargetRegisterInfo.cpp +++ b/llvm/lib/Target/TargetRegisterInfo.cpp @@ -207,6 +207,7 @@ getCommonSuperRegClass(const TargetRegisterClass *RCA, unsigned SubA, unsigned *BestPreB = &PreB; if (RCA->getSize() < RCB->getSize()) { std::swap(RCA, RCB); + std::swap(SubA, SubB); std::swap(BestPreA, BestPreB); } |