aboutsummaryrefslogtreecommitdiffstats
path: root/test/LLC/2002-02-12-setuw-setsw.llx
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-02-11 23:22:56 +0000
committerChris Lattner <sabre@nondot.org>2002-02-11 23:22:56 +0000
commit7e49ea1519fef0feb9586048b7eb928f6790bf16 (patch)
treec61682a05834aa3c004ee5071de57d26bd19df7c /test/LLC/2002-02-12-setuw-setsw.llx
parent90c511cd18cedbde8dc3b96d694c8ad7b728ae14 (diff)
downloadexternal_llvm-7e49ea1519fef0feb9586048b7eb928f6790bf16.zip
external_llvm-7e49ea1519fef0feb9586048b7eb928f6790bf16.tar.gz
external_llvm-7e49ea1519fef0feb9586048b7eb928f6790bf16.tar.bz2
Add testcase for sparc backend
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1731 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/LLC/2002-02-12-setuw-setsw.llx')
-rw-r--r--test/LLC/2002-02-12-setuw-setsw.llx25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/LLC/2002-02-12-setuw-setsw.llx b/test/LLC/2002-02-12-setuw-setsw.llx
new file mode 100644
index 0000000..7cf46b6
--- /dev/null
+++ b/test/LLC/2002-02-12-setuw-setsw.llx
@@ -0,0 +1,25 @@
+; Our back-end is generating set-unsigned (setuw) for -2, when it
+; should be using setsw.
+;
+; RUN: as %s -f -o Output/%s.bc
+; RUN: llc -f Output/%s.bc
+; RUN: /usr/ccs/bin/as Output/%s.s -xarch=v9
+; RUN: /opt/SUNWspro60/bin/cc -xarch=v9 Output/%s.o -o Output/%s.exe
+; RUN: Output/%s.exe
+;
+
+implementation
+declare void "abort"()
+
+int "main"(int %argc, sbyte * * %argv)
+begin
+ %T1 = cast int 2 to uint
+ %tmp = add uint %T1, 4294967294 ; == -2
+ %cond = seteq uint %tmp, 0
+ br bool %cond, label %Ok, label %Fail
+Ok:
+ ret int 0
+Fail:
+ call void %abort()
+ ret int 1
+end