[PATCH] D11904: [X86] Disable mul -> shl + lea combine when compiling for minsize
Michael Kuperstein via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 11 01:58:07 PDT 2015
mkuper added a comment.
Thanks, Simon, Sanjay.
Simon:
It should be all right now. E.g.:
echo imull $12, %eax, %eax | llvm-mc --show-encoding
.text
imull $12, %eax, %eax # encoding: [0x6b,0xc0,0x0c]
The issues you were seeing were most likely fixed in r241152.
================
Comment at: test/CodeGen/X86/imul.ll:112-119
@@ +111,10 @@
+
+define i32 @mul4_32_minsize(i32 %A) minsize {
+; X64-LABEL: mul4_32_minsize:
+; X64: leal
+; X86-LABEL: mul4_32_minsize:
+; X86: shll
+ %mul = mul i32 %A, 4
+ ret i32 %mul
+}
+
----------------
spatel wrote:
> Does this test change with the patch? Is there a reason i386 should be different than x86-64?
This is just a copy of a test from above, but with minsize added. I wanted to verify that we still produce a single shift/lea (as opposed to a sequence with > 1 instructions) even under minsize.
Do you think this is redundant?
http://reviews.llvm.org/D11904
More information about the llvm-commits
mailing list