diff options
| author | Matthias Braun <matze@braunis.de> | 2015-06-16 18:22:26 +0000 |
|---|---|---|
| committer | Matthias Braun <matze@braunis.de> | 2015-06-16 18:22:26 +0000 |
| commit | f63c807809a4f4432f14204fef16f8d814fee188 (patch) | |
| tree | ea891b930586109f887dd9d916d9d635c8eec248 /llvm/lib/CodeGen | |
| parent | 1c140bda696ccdddf19619c1f1ef697ae7a6ca09 (diff) | |
| download | bcm5719-llvm-f63c807809a4f4432f14204fef16f8d814fee188.tar.gz bcm5719-llvm-f63c807809a4f4432f14204fef16f8d814fee188.zip | |
TargetRegisterInfo: Make the concept of imprecise lane masks explicit
LaneMasks as given by getSubRegIndexLaneMask() have a limited number of
of bits, so for targets with more than 31 disjunct subregister there may
be cases where:
getSubReg(Reg,A) does not overlap getSubReg(Reg,B)
but we still have
(getSubRegIndexLaneMask(A) & getSubRegIndexLaneMask(B)) != 0.
I had hoped to keep this an implementation detail of the tablegen but as
my next commit shows we can avoid unnecessary imp-defs operands if we
know that the lane masks in use are precise.
This is in preparation to http://reviews.llvm.org/D10470.
llvm-svn: 239837
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/RegisterCoalescer.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/RegisterCoalescer.cpp b/llvm/lib/CodeGen/RegisterCoalescer.cpp index e513a4f1ccf..7b7c7502172 100644 --- a/llvm/lib/CodeGen/RegisterCoalescer.cpp +++ b/llvm/lib/CodeGen/RegisterCoalescer.cpp @@ -2633,7 +2633,8 @@ bool RegisterCoalescer::joinVirtRegs(CoalescerPair &CP) { // "overflow bit" 32. As a workaround we drop all subregister ranges // which means we loose some precision but are back to a well defined // state. - assert((CP.getNewRC()->getLaneMask() & 0x80000000u) + assert(TargetRegisterInfo::isImpreciseLaneMask( + CP.getNewRC()->getLaneMask()) && "SubRange merge should only fail when merging into bit 32."); DEBUG(dbgs() << "\tSubrange join aborted!\n"); LHS.clearSubRanges(); |

