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 | 9b23d57dc480a34eee9867be52b9c2022e8979f6 (patch) | |
tree | 9bc01e07d54971010fe9ae80b58e10aee67481c6 /lib | |
parent | 713e953118175d693a3fddbf6a61dc73aa69ad87 (diff) |
Fix bug in TRI::getCommonSuperRegClass().
Test cases for this code are coming. It is not used for anything yet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156327 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Target/TargetRegisterInfo.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Target/TargetRegisterInfo.cpp b/lib/Target/TargetRegisterInfo.cpp index 532e6d2318..4acbe729d7 100644 --- a/lib/Target/TargetRegisterInfo.cpp +++ b/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); } |