[PATCH] D16693: Make sure all subranges are define during re-materialization of constants in RegCoalescer
Marcello Maggioni via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 1 14:44:10 PST 2016
kariddi added a comment.
Thanks Mathias for all the comments!
I'm working on the new patch with your suggestions addressed.
The final commit would be split in two (fix + verifier).
================
Comment at: lib/CodeGen/MachineVerifier.cpp:1734-1737
@@ +1733,6 @@
+ }
+ // If any lane didn't have a proper definition report.
+ if (LiveMask != MaxMask)
+ report("Lane mask defined but no sub range reports its definition",
+ MF);
+ }
----------------
MatzeB wrote:
> I think you can make this test more powerful if you leave out the if (MO.getSubReg() == 0) above and instead do something like this here:
>
> ```
> LaneBitmask MOMask = TRI->getSubRegIndexLaneMask(MO.getSubReg());
> if ( (LiveMask & MOMask) != MOMask) { report(...); }
> ```
Actually this doesn't seem to be equivalent to what was there before. If getSubReg() returns 0 I get the mask ~0U from getSubRegIndexLaneMask
Would that work if I made that:
```
LaneBitmask MOMask = TRI->getSubRegIndexLaneMask(MO.getSubReg()) & MaxMask;
if ((LiveMask & MOMask) != MOMask) {
report("Lane mask defined but no sub range reports its definition",
MF);
}
```
Repository:
rL LLVM
http://reviews.llvm.org/D16693
More information about the llvm-commits
mailing list