aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/PowerPC/2007-04-24-InlineAsm-I-Modifier.ll
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-04-24 22:49:57 +0000
committerChris Lattner <sabre@nondot.org>2007-04-24 22:49:57 +0000
commit10161db78085c3c004213a8f9c9c180efc7f484c (patch)
tree840f559e9a49dfd31c4620daa451c811caaca41f /test/CodeGen/PowerPC/2007-04-24-InlineAsm-I-Modifier.ll
parentb635d3faaca45ceea175fc536db6fa891e42c9c6 (diff)
downloadexternal_llvm-10161db78085c3c004213a8f9c9c180efc7f484c.zip
external_llvm-10161db78085c3c004213a8f9c9c180efc7f484c.tar.gz
external_llvm-10161db78085c3c004213a8f9c9c180efc7f484c.tar.bz2
testcase for PR1351
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36409 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/PowerPC/2007-04-24-InlineAsm-I-Modifier.ll')
-rw-r--r--test/CodeGen/PowerPC/2007-04-24-InlineAsm-I-Modifier.ll15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/CodeGen/PowerPC/2007-04-24-InlineAsm-I-Modifier.ll b/test/CodeGen/PowerPC/2007-04-24-InlineAsm-I-Modifier.ll
new file mode 100644
index 0000000..8405703
--- /dev/null
+++ b/test/CodeGen/PowerPC/2007-04-24-InlineAsm-I-Modifier.ll
@@ -0,0 +1,15 @@
+; RUN: llvm-as < %s | llc -march=ppc32 -mtriple=powerpc-apple-darwin8.8.0 | grep {foo r3, r4}
+; RUN: llvm-as < %s | llc -march=ppc32 -mtriple=powerpc-apple-darwin8.8.0 | grep {bar r3, r}
+
+; PR1351
+
+define i32 @test1(i32 %Y, i32 %X) {
+ %tmp1 = tail call i32 asm "foo${1:I} $0, $1", "=r,rI"( i32 %X )
+ ret i32 %tmp1
+}
+
+;; TODO: We'd actually prefer this to be 'bari r3, 47', but 'bar r3, rN' is also ok.
+define i32 @test2(i32 %Y, i32 %X) {
+ %tmp1 = tail call i32 asm "bar${1:I} $0, $1", "=r,rI"( i32 47 )
+ ret i32 %tmp1
+}