diff options
author | Dan Gohman <gohman@apple.com> | 2008-02-18 17:55:26 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-02-18 17:55:26 +0000 |
commit | 339ffedca9f5f367d26507eb631fd5f929c04677 (patch) | |
tree | 2387b32870024768b77060e5ded1cd7085cd800f /test/CodeGen/X86/mul-remat.ll | |
parent | e10c0b9d66910dd1dbe2914877ae71ac5dea941f (diff) | |
download | llvm-339ffedca9f5f367d26507eb631fd5f929c04677.tar.gz llvm-339ffedca9f5f367d26507eb631fd5f929c04677.tar.bz2 llvm-339ffedca9f5f367d26507eb631fd5f929c04677.tar.xz |
Don't mark scalar integer multiplication as Expand on x86, since x86
has plain one-result scalar integer multiplication instructions.
This avoids expanding such instructions into MUL_LOHI sequences that
must be special-cased at isel time, and avoids the problem with that
code that provented memory operands from being folded.
This fixes PR1874, addressesing the most common case. The uncommon
cases of optimizing multiply-high operations will require work
in DAGCombiner.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47277 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/mul-remat.ll')
-rw-r--r-- | test/CodeGen/X86/mul-remat.ll | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/CodeGen/X86/mul-remat.ll b/test/CodeGen/X86/mul-remat.ll new file mode 100644 index 0000000000..ffc8cc0ba6 --- /dev/null +++ b/test/CodeGen/X86/mul-remat.ll @@ -0,0 +1,8 @@ +; RUN: llvm-as < %s | llc -march=x86 | grep mov | count 1 +; PR1874 + +define i32 @test(i32 %a, i32 %b) { +entry: + %tmp3 = mul i32 %b, %a + ret i32 %tmp3 +} |