[PATCH] D54770: [x86] try to lower multiply i8 with constant to LEA

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 21 09:32:11 PST 2018


spatel added inline comments.


================
Comment at: lib/Target/X86/X86ISelLowering.cpp:23430
+        // Extend/truncate an 8-bit multiply to 32-bit to allow LEA formation.
+        SDValue ZextOp0 = DAG.getNode(ISD::ZERO_EXTEND, dl, MVT::i32, A);
+        SDValue NewMul = DAG.getNode(ISD::MUL, dl, MVT::i32, ZextOp0,
----------------
craig.topper wrote:
> Why ZERO_EXTEND and not ANY_EXTEND?
No reason. I just didn't think of it. I'll change it if we're proceeding here, or better to just push ahead with D54803?


https://reviews.llvm.org/D54770





More information about the llvm-commits mailing list