[PATCH] D71589: [PowerPC] Adding a match pattern to recognize the and mask with RLWINM8
Kai Luo via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 18 21:35:38 PST 2019
lkail added inline comments.
================
Comment at: llvm/lib/Target/PowerPC/PPCInstrInfo.td:385
+ uint64_t Mask = (uint64_t)N->getZExtValue();
+ return isUInt<32>(Mask) && isRunOfOnes((unsigned)Mask, mb, me);
+ }
----------------
steven.zhang wrote:
> shchenz wrote:
> > we can only return true when mb is not bigger than me. and mask can be 0XF000000F, it becomes to 0XFFFFFFFFF000000F in rlwinm,then we get a 64bit value. This is wrong.
> Good point. And yes, this is the problem.
Do we have to check `Mask & 0xffffffff00000000 == 0`?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71589/new/
https://reviews.llvm.org/D71589
More information about the llvm-commits
mailing list