diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2009-06-19 01:43:08 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2009-06-19 01:43:08 +0000 |
commit | 2e051ed7b5b9dab4ee28fb67af641e6df9024bc6 (patch) | |
tree | 3fab9086709a01a4d2466e48e1c52e0d59d75feb /test | |
parent | a35e3bd3dd4f53bbdca862a74467ef0b70f706ca (diff) | |
download | external_llvm-2e051ed7b5b9dab4ee28fb67af641e6df9024bc6.zip external_llvm-2e051ed7b5b9dab4ee28fb67af641e6df9024bc6.tar.gz external_llvm-2e051ed7b5b9dab4ee28fb67af641e6df9024bc6.tar.bz2 |
Mark a few Thumb instructions commutable; just happened to spot this
while experimenting. I'm reasonably sure this is correct, but please
tell me if these instructions have some strange property which makes this
change unsafe.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73746 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/CodeGen/ARM/2009-06-18-ThumbCommuteMul.ll | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/CodeGen/ARM/2009-06-18-ThumbCommuteMul.ll b/test/CodeGen/ARM/2009-06-18-ThumbCommuteMul.ll new file mode 100644 index 0000000..9b2aba9 --- /dev/null +++ b/test/CodeGen/ARM/2009-06-18-ThumbCommuteMul.ll @@ -0,0 +1,8 @@ +; RUN: llvm-as < %s | llc -march=thumb | grep r0 | count 1 + +define i32 @a(i32 %x, i32 %y) nounwind readnone { +entry: + %mul = mul i32 %y, %x ; <i32> [#uses=1] + ret i32 %mul +} + |