aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/SystemZ/03-RetSubSubreg.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/SystemZ/03-RetSubSubreg.ll')
-rw-r--r--test/CodeGen/SystemZ/03-RetSubSubreg.ll22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/CodeGen/SystemZ/03-RetSubSubreg.ll b/test/CodeGen/SystemZ/03-RetSubSubreg.ll
new file mode 100644
index 0000000..591b37d
--- /dev/null
+++ b/test/CodeGen/SystemZ/03-RetSubSubreg.ll
@@ -0,0 +1,22 @@
+; RUN: llvm-as < %s | llc -march=systemz | grep sr | count 3
+; RUN: llvm-as < %s | llc -march=systemz | grep llgfr | count 1
+; RUN: llvm-as < %s | llc -march=systemz | grep lgfr | count 2
+
+define i32 @foo(i32 %a, i32 %b) {
+entry:
+ %c = sub i32 %a, %b
+ ret i32 %c
+}
+
+define i32 @foo1(i32 %a, i32 %b) zeroext {
+entry:
+ %c = sub i32 %a, %b
+ ret i32 %c
+}
+
+define i32 @foo2(i32 %a, i32 %b) signext {
+entry:
+ %c = sub i32 %a, %b
+ ret i32 %c
+}
+