summaryrefslogtreecommitdiffstats
path: root/test/CodeGen/Thumb2/thumb2-smla.ll
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2009-07-07 01:17:28 +0000
committerEvan Cheng <evan.cheng@apple.com>2009-07-07 01:17:28 +0000
commit5b9fcd1c8e9f2b7964a82cd383441f568890b561 (patch)
tree325596d238d07269a232a57cad82a6d261f0a855 /test/CodeGen/Thumb2/thumb2-smla.ll
parent58541fd62707b6856beee3db9e254b0110607bb1 (diff)
downloadexternal_llvm-5b9fcd1c8e9f2b7964a82cd383441f568890b561.zip
external_llvm-5b9fcd1c8e9f2b7964a82cd383441f568890b561.tar.gz
external_llvm-5b9fcd1c8e9f2b7964a82cd383441f568890b561.tar.bz2
Add some more Thumb2 multiplication instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74889 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/Thumb2/thumb2-smla.ll')
-rw-r--r--test/CodeGen/Thumb2/thumb2-smla.ll10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/CodeGen/Thumb2/thumb2-smla.ll b/test/CodeGen/Thumb2/thumb2-smla.ll
new file mode 100644
index 0000000..0c65f23
--- /dev/null
+++ b/test/CodeGen/Thumb2/thumb2-smla.ll
@@ -0,0 +1,10 @@
+; RUN: llvm-as < %s | llc -march=thumb -mattr=+thumb2 | \
+; RUN: grep smlabt | count 1
+
+define i32 @f3(i32 %a, i16 %x, i32 %y) {
+ %tmp = sext i16 %x to i32 ; <i32> [#uses=1]
+ %tmp2 = ashr i32 %y, 16 ; <i32> [#uses=1]
+ %tmp3 = mul i32 %tmp2, %tmp ; <i32> [#uses=1]
+ %tmp5 = add i32 %tmp3, %a ; <i32> [#uses=1]
+ ret i32 %tmp5
+}