mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-24 22:32:47 +00:00
7e49ea1519
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1731 91177308-0d34-0410-b5e6-96231b3b80d8
26 lines
567 B
Plaintext
26 lines
567 B
Plaintext
; 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
|