[PATCH] D12196: [ARM] Extract shifts out of multiply-by-constant

John Brawn via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 7 05:13:16 PDT 2015


john.brawn added inline comments.

================
Comment at: lib/Target/ARM/ARMISelDAGToDAG.cpp:538
@@ +537,3 @@
+  // use it in a shifted operand do so.
+  if (N.getOpcode() == ISD::MUL && N.hasOneUse()) {
+    unsigned PowerOfTwo = 0;
----------------
rengolin wrote:
> You already test this in ExtractShiftFromMul, no?
ExtractShiftFromMul checks if the constant that is being multiplied by has more than one use, but here it's checking if the multiply has more than one use. Moving this check into ExtractShiftFromMul makes sense though, so I'll do that.


Repository:
  rL LLVM

http://reviews.llvm.org/D12196





More information about the llvm-commits mailing list