summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/ARM/mls.ll
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2009-07-06 22:05:45 +0000
committerEvan Cheng <evan.cheng@apple.com>2009-07-06 22:05:45 +0000
commite63b0e6f79302826b863a8f5cc949f60e914dd44 (patch)
treef6716207c2c923a2fb796d114a0a03acc0293720 /llvm/test/CodeGen/ARM/mls.ll
parenteea8c29aa332e96f627f72c07a1dbe393d9496e6 (diff)
downloadbcm5719-llvm-e63b0e6f79302826b863a8f5cc949f60e914dd44.tar.gz
bcm5719-llvm-e63b0e6f79302826b863a8f5cc949f60e914dd44.zip
Added ARM::mls for armv6t2.
llvm-svn: 74866
Diffstat (limited to 'llvm/test/CodeGen/ARM/mls.ll')
-rw-r--r--llvm/test/CodeGen/ARM/mls.ll14
1 files changed, 14 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/ARM/mls.ll b/llvm/test/CodeGen/ARM/mls.ll
new file mode 100644
index 00000000000..fd3a7b626b1
--- /dev/null
+++ b/llvm/test/CodeGen/ARM/mls.ll
@@ -0,0 +1,14 @@
+; RUN: llvm-as < %s | llc -march=arm -mattr=+v6t2 | grep {mls\\W*r\[0-9\],\\W*r\[0-9\],\\W*r\[0-9\],\\W*r\[0-9\]} | count 1
+
+define i32 @f1(i32 %a, i32 %b, i32 %c) {
+ %tmp1 = mul i32 %a, %b
+ %tmp2 = sub i32 %c, %tmp1
+ ret i32 %tmp2
+}
+
+; sub doesn't commute, so no mls for this one
+define i32 @f2(i32 %a, i32 %b, i32 %c) {
+ %tmp1 = mul i32 %a, %b
+ %tmp2 = sub i32 %tmp1, %c
+ ret i32 %tmp2
+}
OpenPOWER on IntegriCloud