[PATCH] D21078: [Thumb] Select a BIC instead of AND if the immediate can be encoded more optimally negated

silviu.baranga@arm.com via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 8 06:33:43 PDT 2016


sbaranga added inline comments.

================
Comment at: lib/Target/ARM/ARMISelDAGToDAG.cpp:2801
@@ +2800,3 @@
+    auto *N1C = dyn_cast<ConstantSDNode>(N->getOperand(1));
+    if (N1C && N1C->hasOneUse() && Subtarget->isThumb()) {
+      uint32_t Imm = (uint32_t) N1C->getZExtValue();
----------------
If the constant ends up as an immediate, why limit it to only having one use?


Repository:
  rL LLVM

http://reviews.llvm.org/D21078





More information about the llvm-commits mailing list