aboutsummaryrefslogtreecommitdiffstats
path: root/test/LLC/2002-02-12-setuw-setsw.llx
blob: 7cf46b68e6f6c71a0a37ed8e54c20c7fb757fc4e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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