summaryrefslogtreecommitdiffstats
path: root/llvm/test/MC/Hexagon
diff options
context:
space:
mode:
authorColin LeMahieu <colinl@codeaurora.org>2014-11-26 19:43:12 +0000
committerColin LeMahieu <colinl@codeaurora.org>2014-11-26 19:43:12 +0000
commit6e0f9f8d61be1535c2b5c18a0d7620a40b8be9ec (patch)
tree5a55f0d8513b10bcb7b52563d12055dc86a2e666 /llvm/test/MC/Hexagon
parent42ea81f655ae0982c2f1fd3890094a3f17a80c15 (diff)
downloadbcm5719-llvm-6e0f9f8d61be1535c2b5c18a0d7620a40b8be9ec.tar.gz
bcm5719-llvm-6e0f9f8d61be1535c2b5c18a0d7620a40b8be9ec.zip
[Hexagon] Adding cmp* immediate form instructions.
llvm-svn: 222849
Diffstat (limited to 'llvm/test/MC/Hexagon')
-rw-r--r--llvm/test/MC/Hexagon/inst_cmp_eqi.ll10
-rw-r--r--llvm/test/MC/Hexagon/inst_cmp_gti.ll10
-rw-r--r--llvm/test/MC/Hexagon/inst_cmp_ugti.ll10
3 files changed, 30 insertions, 0 deletions
diff --git a/llvm/test/MC/Hexagon/inst_cmp_eqi.ll b/llvm/test/MC/Hexagon/inst_cmp_eqi.ll
new file mode 100644
index 00000000000..78c92902350
--- /dev/null
+++ b/llvm/test/MC/Hexagon/inst_cmp_eqi.ll
@@ -0,0 +1,10 @@
+;; RUN: llc -mtriple=hexagon-unknown-elf -filetype=obj %s -o - \
+;; RUN: | llvm-objdump -s - | FileCheck %s
+
+define i1 @foo (i32 %a)
+{
+ %1 = icmp eq i32 %a, 42
+ ret i1 %1
+}
+
+; CHECK: 0000 40450075 00400000 00c09f52
diff --git a/llvm/test/MC/Hexagon/inst_cmp_gti.ll b/llvm/test/MC/Hexagon/inst_cmp_gti.ll
new file mode 100644
index 00000000000..36828cc4209
--- /dev/null
+++ b/llvm/test/MC/Hexagon/inst_cmp_gti.ll
@@ -0,0 +1,10 @@
+;; RUN: llc -mtriple=hexagon-unknown-elf -filetype=obj %s -o - \
+;; RUN: | llvm-objdump -s - | FileCheck %s
+
+define i1 @foo (i32 %a)
+{
+ %1 = icmp sgt i32 %a, 42
+ ret i1 %1
+}
+
+; CHECK: 0000 40454075 00400000 00c09f52
diff --git a/llvm/test/MC/Hexagon/inst_cmp_ugti.ll b/llvm/test/MC/Hexagon/inst_cmp_ugti.ll
new file mode 100644
index 00000000000..459b5bf77d3
--- /dev/null
+++ b/llvm/test/MC/Hexagon/inst_cmp_ugti.ll
@@ -0,0 +1,10 @@
+;; RUN: llc -mtriple=hexagon-unknown-elf -filetype=obj %s -o - \
+;; RUN: | llvm-objdump -s - | FileCheck %s
+
+define i1 @foo (i32 %a)
+{
+ %1 = icmp ugt i32 %a, 42
+ ret i1 %1
+}
+
+; CHECK: 0000 40458075 00400000 00c09f52
OpenPOWER on IntegriCloud