mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-21 13:33:26 +00:00
Make testcase legal LLVM
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3201 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
cc8d8fb676
commit
92ae901d9e
@ -88,24 +88,20 @@ end
|
|||||||
; 1. can be folded
|
; 1. can be folded
|
||||||
; 2. cannot be folded because result of comparison is used twice
|
; 2. cannot be folded because result of comparison is used twice
|
||||||
;
|
;
|
||||||
void "testbool"(int, int) ; Def %0, %1
|
void "testbool"(int %A, int %B) {
|
||||||
const int 0 ; Def 2
|
|
||||||
const int -4 ; Def 3
|
|
||||||
begin
|
|
||||||
; <label>:0
|
|
||||||
br label %Top
|
br label %Top
|
||||||
Top:
|
Top:
|
||||||
add int %0, %1 ; Def 4
|
%D = add int %A, %B
|
||||||
sub int %4, %3 ; Def 5
|
%E = sub int %D, -4
|
||||||
setle int %5, %2 ; Def 0 - bool plane
|
%C = setle int %E, 0
|
||||||
br bool %0, label %retlbl, label %loop
|
br bool %C, label %retlbl, label %loop
|
||||||
|
|
||||||
loop:
|
loop:
|
||||||
add int %0, %1 ; Def 6
|
%F = add int %A, %B
|
||||||
sub int %4, %3 ; Def 7
|
%G = sub int %D, -4
|
||||||
setle int %7, %2 ; Def 1 - bool
|
%D = setle int %G, 0
|
||||||
not bool %1 ; Def 2 - bool. first use of bool %1
|
%E = not bool %D
|
||||||
br bool %1, label %loop, label %Top ; second use of bool %1
|
br bool %E, label %loop, label %Top
|
||||||
|
|
||||||
retlbl:
|
retlbl:
|
||||||
ret void
|
ret void
|
||||||
@ -151,5 +147,5 @@ bb2: ;;<label>
|
|||||||
%cast117 = cast int %reg118 to long ;; reg118 will be copied 'cos
|
%cast117 = cast int %reg118 to long ;; reg118 will be copied 'cos
|
||||||
%reg159 = add long 1234567, %cast117 ;; cast117 has 2 uses, here
|
%reg159 = add long 1234567, %cast117 ;; cast117 has 2 uses, here
|
||||||
%reg160 = add long 7654321, %cast117 ;; and here.
|
%reg160 = add long 7654321, %cast117 ;; and here.
|
||||||
ret void
|
ret int 0
|
||||||
end
|
end
|
||||||
|
@ -88,24 +88,20 @@ end
|
|||||||
; 1. can be folded
|
; 1. can be folded
|
||||||
; 2. cannot be folded because result of comparison is used twice
|
; 2. cannot be folded because result of comparison is used twice
|
||||||
;
|
;
|
||||||
void "testbool"(int, int) ; Def %0, %1
|
void "testbool"(int %A, int %B) {
|
||||||
const int 0 ; Def 2
|
|
||||||
const int -4 ; Def 3
|
|
||||||
begin
|
|
||||||
; <label>:0
|
|
||||||
br label %Top
|
br label %Top
|
||||||
Top:
|
Top:
|
||||||
add int %0, %1 ; Def 4
|
%D = add int %A, %B
|
||||||
sub int %4, %3 ; Def 5
|
%E = sub int %D, -4
|
||||||
setle int %5, %2 ; Def 0 - bool plane
|
%C = setle int %E, 0
|
||||||
br bool %0, label %retlbl, label %loop
|
br bool %C, label %retlbl, label %loop
|
||||||
|
|
||||||
loop:
|
loop:
|
||||||
add int %0, %1 ; Def 6
|
%F = add int %A, %B
|
||||||
sub int %4, %3 ; Def 7
|
%G = sub int %D, -4
|
||||||
setle int %7, %2 ; Def 1 - bool
|
%D = setle int %G, 0
|
||||||
not bool %1 ; Def 2 - bool. first use of bool %1
|
%E = not bool %D
|
||||||
br bool %1, label %loop, label %Top ; second use of bool %1
|
br bool %E, label %loop, label %Top
|
||||||
|
|
||||||
retlbl:
|
retlbl:
|
||||||
ret void
|
ret void
|
||||||
@ -151,5 +147,5 @@ bb2: ;;<label>
|
|||||||
%cast117 = cast int %reg118 to long ;; reg118 will be copied 'cos
|
%cast117 = cast int %reg118 to long ;; reg118 will be copied 'cos
|
||||||
%reg159 = add long 1234567, %cast117 ;; cast117 has 2 uses, here
|
%reg159 = add long 1234567, %cast117 ;; cast117 has 2 uses, here
|
||||||
%reg160 = add long 7654321, %cast117 ;; and here.
|
%reg160 = add long 7654321, %cast117 ;; and here.
|
||||||
ret void
|
ret int 0
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user