[PATCH] D39004: [ARM] Swap cmp operands for automatic shifts.

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 17 11:43:43 PDT 2017


efriedma added inline comments.


================
Comment at: lib/Target/ARM/ARMISelLowering.cpp:3861
     }
-  }
+  } else if ((ARM_AM::getShiftOpcForNode(LHS.getOpcode()) != ARM_AM::no_shift)&&
+             (ARM_AM::getShiftOpcForNode(RHS.getOpcode()) == ARM_AM::no_shift))
----------------
Whitespace.


================
Comment at: test/CodeGen/ARM/cmp-shift-swap.ll:12
+  %conv = zext i1 %cmp to i32
+  ret i32 %conv
+}
----------------
We already have some related tests in test/CodeGen/Thumb2/thumb2-cmp2.ll; could you combine these into the same file?

Please include a testcase for a rotate.


https://reviews.llvm.org/D39004





More information about the llvm-commits mailing list