[PATCH] D35014: [X86] PR32755 : Improvement in CodeGen instruction selection for LEAs.

Lama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 6 01:26:47 PDT 2017


lsaba added inline comments.


================
Comment at: lib/Target/X86/X86OptimizeLEAs.cpp:727
+              .addUse(LI2.getOperand(0).getReg())  // Base  = Dst of LI2.
+              .addImm(Scale1-Scale2)               // Scale = Diff b/w scales.
+              .addUse(LI1.getOperand(3).getReg())  // Index = Index of LI1.
----------------
could we end up with an illegal scale here? (eg. scale1 = 4, scale2=1)


https://reviews.llvm.org/D35014





More information about the llvm-commits mailing list