summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/Thumb2/thumb2-cmn.ll
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/CodeGen/Thumb2/thumb2-cmn.ll')
-rw-r--r--llvm/test/CodeGen/Thumb2/thumb2-cmn.ll25
1 files changed, 25 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/Thumb2/thumb2-cmn.ll b/llvm/test/CodeGen/Thumb2/thumb2-cmn.ll
new file mode 100644
index 00000000000..1f3ef1b014b
--- /dev/null
+++ b/llvm/test/CodeGen/Thumb2/thumb2-cmn.ll
@@ -0,0 +1,25 @@
+; RUN: llvm-as < %s | llc -march=thumb -mattr=+thumb2 | grep {cmn\\W*r\[0-9\],\\W*r\[0-9\]} | count 4
+
+define i1 @f1(i32 %a, i32 %b) {
+ %nb = sub i32 0, %b
+ %tmp = icmp ne i32 %a, %nb
+ ret i1 %tmp
+}
+
+define i1 @f2(i32 %a, i32 %b) {
+ %nb = sub i32 0, %b
+ %tmp = icmp ne i32 %nb, %a
+ ret i1 %tmp
+}
+
+define i1 @f3(i32 %a, i32 %b) {
+ %nb = sub i32 0, %b
+ %tmp = icmp eq i32 %a, %nb
+ ret i1 %tmp
+}
+
+define i1 @f4(i32 %a, i32 %b) {
+ %nb = sub i32 0, %b
+ %tmp = icmp eq i32 %nb, %a
+ ret i1 %tmp
+}
OpenPOWER on IntegriCloud