[PATCH] D71589: [PowerPC] Adding a match pattern to recognize the and mask with RLWINM8

ChenZheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 18 03:17:05 PST 2019


shchenz added a comment.

Right, current patch should still be with bug.



================
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);
+  }
----------------
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. 


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71589/new/

https://reviews.llvm.org/D71589





More information about the llvm-commits mailing list