[PATCH] D32352: Go to eleven
Zvi Rackover via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 25 08:51:53 PDT 2017
zvi added inline comments.
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:30970
const X86Subtarget &Subtarget) {
+ if (!MulConstantOptimization)
+ return SDValue();
----------------
avt77 wrote:
> zvi wrote:
> > This flags is intended also for vector types?
> I think YES. Or we need separate one?
Since this patch only affects scalar multiplies, i would expect the added flag to only affect the scalar multiply code path.
Combines for vector types are in reduceVMULWidth which remains unchanged.
Does this make sense?
================
Comment at: test/CodeGen/X86/mul-constant-i64.ll:1872
+; HSW-NOOPT: # BB#0:
+; HSW-NOOPT-NEXT: leaq 42(%rdi,%rdi,8), %rcx # sched: [1:0.50]
+; HSW-NOOPT-NEXT: leaq 2(%rdi,%rdi,4), %rax # sched: [1:0.50]
----------------
Thanks for adding this test-case. Now that there is a case where 3-operand LEA's are selected,
@lsaba: which of the following is fastest?
1. 2 x (3-op LEA) + 1 x imul
2. 3 x imul + 2 x add
3. 2 x (2-op LEA) + 2 x add + 1 imul
Will D32277 change this case from 1. to 3.?
https://reviews.llvm.org/D32352
More information about the llvm-commits
mailing list