[PATCH] D92235: [ARM] Turn pred_cast(xor(x, -1)) into xor(pred_cast(x), -1)

Simon Tatham via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 30 02:35:46 PST 2020


simon_tatham added inline comments.


================
Comment at: llvm/lib/Target/ARM/ARMISelLowering.cpp:13913
+      isa<ConstantSDNode>(Op.getOperand(1)) &&
+      Op.getConstantOperandAPInt(1).isMask(32)) {
+    SDValue X =
----------------
VPT predicates are only 16 bits wide, so I think we could legally apply this to any constant XOR that has the bottom 16 bits set, not just 0xFFFFFFFF.

In case somebody wrote out `pred ^ 0xFFFF` longhand in source code, would it be better to do that?


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

https://reviews.llvm.org/D92235



More information about the llvm-commits mailing list