Add testcase for sparc backend
[oota-llvm.git] / test / LLC / 2002-02-12-setuw-setsw.llx
1 ; Our back-end is generating set-unsigned (setuw) for -2, when it
2 ; should be using setsw.  
3 ;
4 ; RUN: as %s -f -o Output/%s.bc
5 ; RUN: llc -f Output/%s.bc
6 ; RUN: /usr/ccs/bin/as Output/%s.s -xarch=v9
7 ; RUN: /opt/SUNWspro60/bin/cc -xarch=v9 Output/%s.o -o Output/%s.exe
8 ; RUN: Output/%s.exe
9 ;
10
11 implementation
12 declare void "abort"()
13
14 int "main"(int %argc, sbyte * * %argv)
15 begin
16         %T1 = cast int 2 to uint
17         %tmp = add uint %T1, 4294967294  ; == -2
18         %cond = seteq uint %tmp, 0
19         br bool %cond, label %Ok, label %Fail
20 Ok:
21         ret int 0
22 Fail:
23         call void %abort()
24         ret int 1
25 end