These files are all moved to test/Regression/CodeGen/Generic

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17538 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2004-11-07 00:24:14 +00:00
parent fc77e0d0ae
commit b4be8ee024
23 changed files with 0 additions and 2100 deletions

View File

@ -1,15 +0,0 @@
; RUN: llvm-as -f %s -o - | llc
; This causes the backend to assert out with:
; SparcInstrInfo.cpp:103: failed assertion `0 && "Unexpected unsigned type"'
;
implementation
declare void "bar"(sbyte* %G)
void "foo"()
begin
%cast225 = cast ulong 123456 to sbyte* ; <sbyte*> [#uses=1]
call void %bar( sbyte* %cast225)
ret void
end

View File

@ -1,18 +0,0 @@
; RUN: llvm-as -f %s -o - | llc
; Compiling this file produces:
; Sparc.cpp:91: failed assertion `(offset - OFFSET) % getStackFrameSizeAlignment() == 0'
;
implementation
declare int "SIM"(sbyte* %A, sbyte* %B, int %M, int %N, int %K, [256 x int]* %V, int %Q, int %R, int %nseq)
void "foo"()
begin
bb0: ;[#uses=0]
%V = alloca [256 x int], uint 256 ; <[256 x int]*> [#uses=1]
call int %SIM( sbyte* null, sbyte* null, int 0, int 0, int 0, [256 x int]* %V, int 0, int 0, int 2 ) ; <int>:0 [#uses=0]
ret void
end

View File

@ -1,73 +0,0 @@
; RUN: llvm-as -f %s -o - | llc
;; Date: May 28, 2003.
;; From: test/Programs/MultiSource/McCat-05-eks/QRfact.c
;; Function: Matrix QRiterate(Matrix A, Matrix U)
;;
;; Error: llc produces an invalid register <NULL VALUE> for the
;; phi argument %tmp.213 produced by fcmpd:
;;
;; LLC Output:
;;
;; !****** Outputing Function: QRiterate_1 ******
;;
;; .section ".text"
;; .align 4
;; .global QRiterate_1
;; .type QRiterate_1, 2
;; QRiterate_1:
;; .L_QRiterate_1_LL_0:
;; save %o6, -192, %o6
;; brgz %i0, .L_QRiterate_1_LL_1
;; add %g0, %g0, %o0
;; ba .L_QRiterate_1_LL_2
;; nop
;;
;; .L_QRiterate_1_LL_1:
;; sethi %lm(LLVMGlobal__2), %o1
;; sethi %hh(LLVMGlobal__2), %o0
;; or %o0, %hm(LLVMGlobal__2), %o0
;; sllx %o0, 32, %o0
;; or %o1, %o0, %o1
;; or %o1, %lo(LLVMGlobal__2), %o1
;; ldd [%o1+0], %f32
;; fcmpd %fcc0, %f2, %f32
;; ba .L_QRiterate_1_LL_2
;; add <NULL VALUE>, %g0, %o0
;;
;; .L_QRiterate_1_LL_2:
;; brnz %o0, .L_QRiterate_1_LL_1
;; nop
;; ba .L_QRiterate_1_LL_3
;; nop
;;
;; .L_QRiterate_1_LL_3:
;; jmpl %i7+8, %g0
;; restore %g0, 0, %g0
;;
;; .EndOf_QRiterate_1:
;; .size QRiterate_1, .EndOf_QRiterate_1-QRiterate_1
;;
target endian = big
target pointersize = 64
implementation ; Functions:
internal void %QRiterate(int %p.1, double %tmp.212) {
entry: ; No predecessors!
%tmp.184 = setgt int %p.1, 0 ; <bool> [#uses=1]
br bool %tmp.184, label %shortcirc_next.1, label %shortcirc_done.1
shortcirc_next.1: ; preds = %entry
%tmp.213 = setne double %tmp.212, 0.000000e+00
br label %shortcirc_done.1
shortcirc_done.1: ; preds = %entry, %shortcirc_next.1
%val.1 = phi bool [ false, %entry ], [ %tmp.213, %shortcirc_next.1 ]
br bool %val.1, label %shortcirc_next.1, label %exit.1
exit.1:
ret void
}

View File

@ -1,65 +0,0 @@
; RUN: llvm-as -f %s -o - | llc
;; Date: May 27, 2003.
;; From: Variant of 2003-05-27-usefsubasbool.ll
;;
;; Error: llc fails to save a boolean value in a register (and later uses an
;; invalid register <NULL VALUE> in a BRNZ) for a boolean value
;; used only by branches but in a different basic block.
;;
;; Cause: In SparcInstrSelection.cpp, for SetCC, when a result of setCC
;; is used only for branches, it is not saved into an int. register.
;; But if the boolean is used in a branch in a different basic block,
;; that branch uses a BRNZ inst. instead of a branch-on-CC.
;;
;; LLC Output before fix:
;; !****** Outputing Function: QRiterate_1 ******
;;
;; .section ".text"
;; .align 4
;; .global QRiterate_1
;; .type QRiterate_1, 2
;; QRiterate_1:
;; .L_QRiterate_1_LL_0:
;; save %o6, -192, %o6
;; sethi %lm(LLVMGlobal__2), %o2
;; sethi %hh(LLVMGlobal__2), %o1
;; or %o1, %hm(LLVMGlobal__2), %o1
;; sllx %o1, 32, %o1
;; or %o2, %o1, %o2
;; or %o2, %lo(LLVMGlobal__2), %o2
;; ldd [%o2+0], %f32
;; fcmpd %fcc0, %f0, %f32
;; ba .L_QRiterate_1_LL_1
;; nop
;;
;; .L_QRiterate_1_LL_1:
;; brnz <NULL_VALUE>, .L_QRiterate_1_LL_1
;; nop
;; ba .L_QRiterate_1_LL_2
;; nop
;;
;; .L_QRiterate_1_LL_2:
;; jmpl %i7+8, %g0
;; restore %g0, 0, %g0
;;
;; .EndOf_QRiterate_1:
;; .size QRiterate_1, .EndOf_QRiterate_1-QRiterate_1
;;
target endian = big
target pointersize = 64
implementation ; Functions:
internal void %QRiterate(double %tmp.212) {
entry: ; No predecessors!
%tmp.213 = setne double %tmp.212, 0.000000e+00
br label %shortcirc_next.1
shortcirc_next.1: ; preds = %entry
br bool %tmp.213, label %shortcirc_next.1, label %exit.1
exit.1:
ret void
}

View File

@ -1,65 +0,0 @@
; RUN: llvm-as -f %s -o - | llc
;; Date: May 27, 2003.
;; From: test/Programs/MultiSource/McCat-05-eks/QRfact.c
;; Function: Matrix QRiterate(Matrix A, Matrix U)
;;
;; Error: llc produces an invalid register <NULL VALUE> for the
;; a boolean value computed using setne with a double.
;;
;; Cause: In SparcInstrSelection.cpp, for SetCC, when a result of setne
;; is used for a branch, it can generate a "branch-on-integer-register"
;; for integer registers. In that case, it never saves the value of
;; the boolean result. It was attempting to do the same thing for an
;; FP compare!
;;
;; LLC Output:
;; !****** Outputing Function: QRiterate_1 ******
;;
;; .section ".text"
;; .align 4
;; .global QRiterate_1
;; .type QRiterate_1, 2
;; QRiterate_1:
;; .L_QRiterate_1_LL_0:
;; save %o6, -192, %o6
;; sethi %hh(LLVMGlobal__2), %o1
;; sethi %lm(LLVMGlobal__2), %o0
;; or %o1, %hm(LLVMGlobal__2), %o1
;; sllx %o1, 32, %o1
;; or %o0, %o1, %o0
;; or %o0, %lo(LLVMGlobal__2), %o0
;; ldd [%o0+0], %f32
;; ba .L_QRiterate_1_LL_1
;; fcmpd %fcc0, %f0, %f32
;;
;; .L_QRiterate_1_LL_1:
;; brnz <NULL VALUE>, .L_QRiterate_1_LL_1
;; nop
;; ba .L_QRiterate_1_LL_2
;; nop
;;
;; .L_QRiterate_1_LL_2:
;; jmpl %i7+8, %g0
;; restore %g0, 0, %g0
;;
;; .EndOf_QRiterate_1:
;; .size QRiterate_1, .EndOf_QRiterate_1-QRiterate_1
;;
target endian = big
target pointersize = 64
implementation ; Functions:
internal void %QRiterate(double %tmp.212) {
entry: ; No predecessors!
br label %shortcirc_next.1
shortcirc_next.1: ; preds = %entry
%tmp.213 = setne double %tmp.212, 0.000000e+00
br bool %tmp.213, label %shortcirc_next.1, label %exit.1
exit.1:
ret void
}

View File

@ -1,158 +0,0 @@
; RUN: llvm-as -f %s -o - | llc
;; Date: May 28, 2003.
;; From: test/Programs/External/SPEC/CINT2000/175.vpr.llvm.bc
;; Function: int %main(int %argc.1, sbyte** %argv.1)
;;
;; Error: A function call with about 56 arguments causes an assertion failure
;; in llc because the register allocator cannot find a register
;; not used explicitly by the call instruction.
;;
;; Cause: Regalloc was not keeping track of free registers correctly.
;; It was counting the registers allocated to all outgoing arguments,
;; even though most of those are copied to the stack (so those
;; registers are not actually used by the call instruction).
;;
;; Fixed: By rewriting selection and allocation so that selection explicitly
;; inserts all copy operations required for passing arguments and
;; for the return value of a call, copying to/from registers
;; and/or to stack locations as needed.
;;
target endian = little
target pointersize = 32
%struct..s_annealing_sched = type { uint, float, float, float, float }
%struct..s_chan = type { uint, float, float, float, float }
%struct..s_det_routing_arch = type { uint, float, float, float, uint, int, short, short, short, float, float }
%struct..s_placer_opts = type { int, float, int, uint, sbyte*, uint, int }
%struct..s_router_opts = type { float, float, float, float, float, int, int, uint, int }
%struct..s_segment_inf = type { float, int, short, short, float, float, uint, float, float }
%struct..s_switch_inf = type { uint, float, float, float, float }
implementation
int %main(int %argc.1, sbyte** %argv.1) {
entry:
%net_file = alloca [300 x sbyte]
%place_file = alloca [300 x sbyte]
%arch_file = alloca [300 x sbyte]
%route_file = alloca [300 x sbyte]
%full_stats = alloca uint
%operation = alloca int
%verify_binary_search = alloca uint
%show_graphics = alloca uint
%annealing_sched = alloca %struct..s_annealing_sched
%placer_opts = alloca %struct..s_placer_opts
%router_opts = alloca %struct..s_router_opts
%det_routing_arch = alloca %struct..s_det_routing_arch
%segment_inf = alloca %struct..s_segment_inf*
%timing_inf = alloca { uint, float, float, float, float, float, float, float, float, float, float }
%tmp.101 = getelementptr %struct..s_placer_opts* %placer_opts, long 0, ubyte 4
%tmp.105 = getelementptr [300 x sbyte]* %net_file, long 0, long 0
%tmp.106 = getelementptr [300 x sbyte]* %arch_file, long 0, long 0
%tmp.107 = getelementptr [300 x sbyte]* %place_file, long 0, long 0
%tmp.108 = getelementptr [300 x sbyte]* %route_file, long 0, long 0
%tmp.109 = getelementptr { uint, float, float, float, float, float, float, float, float, float, float }* %timing_inf, long 0, ubyte 0
%tmp.112 = getelementptr %struct..s_placer_opts* %placer_opts, long 0, ubyte 0
%tmp.114 = getelementptr %struct..s_placer_opts* %placer_opts, long 0, ubyte 6
%tmp.118 = getelementptr %struct..s_router_opts* %router_opts, long 0, ubyte 7
%tmp.135 = load int* %operation
%tmp.137 = load int* %tmp.112
%tmp.138 = getelementptr %struct..s_placer_opts* %placer_opts, long 0, ubyte 1
%tmp.139 = load float* %tmp.138
%tmp.140 = getelementptr %struct..s_placer_opts* %placer_opts, long 0, ubyte 2
%tmp.141 = load int* %tmp.140
%tmp.142 = getelementptr %struct..s_placer_opts* %placer_opts, long 0, ubyte 3
%tmp.143 = load uint* %tmp.142
%tmp.145 = load sbyte** %tmp.101
%tmp.146 = getelementptr %struct..s_placer_opts* %placer_opts, long 0, ubyte 5
%tmp.147 = load uint* %tmp.146
%tmp.149 = load int* %tmp.114
%tmp.154 = load uint* %full_stats
%tmp.155 = load uint* %verify_binary_search
%tmp.156 = getelementptr %struct..s_annealing_sched* %annealing_sched, long 0, ubyte 0
%tmp.157 = load uint* %tmp.156
%tmp.158 = getelementptr %struct..s_annealing_sched* %annealing_sched, long 0, ubyte 1
%tmp.159 = load float* %tmp.158
%tmp.160 = getelementptr %struct..s_annealing_sched* %annealing_sched, long 0, ubyte 2
%tmp.161 = load float* %tmp.160
%tmp.162 = getelementptr %struct..s_annealing_sched* %annealing_sched, long 0, ubyte 3
%tmp.163 = load float* %tmp.162
%tmp.164 = getelementptr %struct..s_annealing_sched* %annealing_sched, long 0, ubyte 4
%tmp.165 = load float* %tmp.164
%tmp.166 = getelementptr %struct..s_router_opts* %router_opts, long 0, ubyte 0
%tmp.167 = load float* %tmp.166
%tmp.168 = getelementptr %struct..s_router_opts* %router_opts, long 0, ubyte 1
%tmp.169 = load float* %tmp.168
%tmp.170 = getelementptr %struct..s_router_opts* %router_opts, long 0, ubyte 2
%tmp.171 = load float* %tmp.170
%tmp.172 = getelementptr %struct..s_router_opts* %router_opts, long 0, ubyte 3
%tmp.173 = load float* %tmp.172
%tmp.174 = getelementptr %struct..s_router_opts* %router_opts, long 0, ubyte 4
%tmp.175 = load float* %tmp.174
%tmp.176 = getelementptr %struct..s_router_opts* %router_opts, long 0, ubyte 5
%tmp.177 = load int* %tmp.176
%tmp.178 = getelementptr %struct..s_router_opts* %router_opts, long 0, ubyte 6
%tmp.179 = load int* %tmp.178
%tmp.181 = load uint* %tmp.118
%tmp.182 = getelementptr %struct..s_router_opts* %router_opts, long 0, ubyte 8
%tmp.183 = load int* %tmp.182
%tmp.184 = getelementptr %struct..s_det_routing_arch* %det_routing_arch, long 0, ubyte 0
%tmp.185 = load uint* %tmp.184
%tmp.186 = getelementptr %struct..s_det_routing_arch* %det_routing_arch, long 0, ubyte 1
%tmp.187 = load float* %tmp.186
%tmp.188 = getelementptr %struct..s_det_routing_arch* %det_routing_arch, long 0, ubyte 2
%tmp.189 = load float* %tmp.188
%tmp.190 = getelementptr %struct..s_det_routing_arch* %det_routing_arch, long 0, ubyte 3
%tmp.191 = load float* %tmp.190
%tmp.192 = getelementptr %struct..s_det_routing_arch* %det_routing_arch, long 0, ubyte 4
%tmp.193 = load uint* %tmp.192
%tmp.194 = getelementptr %struct..s_det_routing_arch* %det_routing_arch, long 0, ubyte 5
%tmp.195 = load int* %tmp.194
%tmp.196 = getelementptr %struct..s_det_routing_arch* %det_routing_arch, long 0, ubyte 6
%tmp.197 = load short* %tmp.196
%tmp.198 = getelementptr %struct..s_det_routing_arch* %det_routing_arch, long 0, ubyte 7
%tmp.199 = load short* %tmp.198
%tmp.200 = getelementptr %struct..s_det_routing_arch* %det_routing_arch, long 0, ubyte 8
%tmp.201 = load short* %tmp.200
%tmp.202 = getelementptr %struct..s_det_routing_arch* %det_routing_arch, long 0, ubyte 9
%tmp.203 = load float* %tmp.202
%tmp.204 = getelementptr %struct..s_det_routing_arch* %det_routing_arch, long 0, ubyte 10
%tmp.205 = load float* %tmp.204
%tmp.206 = load %struct..s_segment_inf** %segment_inf
%tmp.208 = load uint* %tmp.109
%tmp.209 = getelementptr { uint, float, float, float, float, float, float, float, float, float, float }* %timing_inf, long 0, ubyte 1
%tmp.210 = load float* %tmp.209
%tmp.211 = getelementptr { uint, float, float, float, float, float, float, float, float, float, float }* %timing_inf, long 0, ubyte 2
%tmp.212 = load float* %tmp.211
%tmp.213 = getelementptr { uint, float, float, float, float, float, float, float, float, float, float }* %timing_inf, long 0, ubyte 3
%tmp.214 = load float* %tmp.213
%tmp.215 = getelementptr { uint, float, float, float, float, float, float, float, float, float, float }* %timing_inf, long 0, ubyte 4
%tmp.216 = load float* %tmp.215
%tmp.217 = getelementptr { uint, float, float, float, float, float, float, float, float, float, float }* %timing_inf, long 0, ubyte 5
%tmp.218 = load float* %tmp.217
%tmp.219 = getelementptr { uint, float, float, float, float, float, float, float, float, float, float }* %timing_inf, long 0, ubyte 6
%tmp.220 = load float* %tmp.219
%tmp.221 = getelementptr { uint, float, float, float, float, float, float, float, float, float, float }* %timing_inf, long 0, ubyte 7
%tmp.222 = load float* %tmp.221
%tmp.223 = getelementptr { uint, float, float, float, float, float, float, float, float, float, float }* %timing_inf, long 0, ubyte 8
%tmp.224 = load float* %tmp.223
%tmp.225 = getelementptr { uint, float, float, float, float, float, float, float, float, float, float }* %timing_inf, long 0, ubyte 9
%tmp.226 = load float* %tmp.225
%tmp.227 = getelementptr { uint, float, float, float, float, float, float, float, float, float, float }* %timing_inf, long 0, ubyte 10
%tmp.228 = load float* %tmp.227
call void %place_and_route( int %tmp.135, int %tmp.137, float %tmp.139, int %tmp.141, uint %tmp.143, sbyte* %tmp.145, uint %tmp.147, int %tmp.149, sbyte* %tmp.107, sbyte* %tmp.105, sbyte* %tmp.106, sbyte* %tmp.108, uint %tmp.154, uint %tmp.155, uint %tmp.157, float %tmp.159, float %tmp.161, float %tmp.163, float %tmp.165, float %tmp.167, float %tmp.169, float %tmp.171, float %tmp.173, float %tmp.175, int %tmp.177, int %tmp.179, uint %tmp.181, int %tmp.183, uint %tmp.185, float %tmp.187, float %tmp.189, float %tmp.191, uint %tmp.193, int %tmp.195, short %tmp.197, short %tmp.199, short %tmp.201, float %tmp.203, float %tmp.205, %struct..s_segment_inf* %tmp.206, uint %tmp.208, float %tmp.210, float %tmp.212, float %tmp.214, float %tmp.216, float %tmp.218, float %tmp.220, float %tmp.222, float %tmp.224, float %tmp.226, float %tmp.228 )
%tmp.231 = load uint* %show_graphics
%tmp.232 = setne uint %tmp.231, 0
br bool %tmp.232, label %then.2, label %endif.2
then.2:
br label %endif.2
endif.2:
ret int 0
}
declare int %printf(sbyte*, ...)
declare void %place_and_route(int, int, float, int, uint, sbyte*, uint, int, sbyte*, sbyte*, sbyte*, sbyte*, uint, uint, uint, float, float, float, float, float, float, float, float, float, int, int, uint, int, uint, float, float, float, uint, int, short, short, short, float, float, %struct..s_segment_inf*, uint, float, float, float, float, float, float, float, float, float, float)

View File

@ -1,50 +0,0 @@
; RUN: llvm-as -f %s -o - | llc
;; Date: May 28, 2003.
;; From: test/Programs/External/SPEC/CINT2000/254.gap.llvm.bc
;; Function: int %OpenOutput(sbyte* %filename.1)
;;
;; Error: A sequence of GEPs is folded incorrectly by llc during selection
;; causing an assertion about a dynamic casting error.
;; This code sequence was produced (correctly) by preselection
;; from a nested pair of ConstantExpr getelementptrs.
;; The code below is the output of preselection.
;; The original ConstantExprs are included in a comment.
;;
;; Cause: FoldGetElemChain() was inserting an extra leading 0 even though
;; the first instruction in the sequence contributes no indices.
;; The next instruction contributes a leading non-zero so another
;; zero should not be added before it!
;;
%FileType = type { int, [256 x sbyte], int, int, int, int }
%OutputFiles = uninitialized global [16 x %FileType]
%Output = internal global %FileType* null
implementation; Functions:
internal int %OpenOutput(sbyte* %filename.1) {
entry:
%tmp.0 = load %FileType** %Output
%tmp.4 = getelementptr %FileType* %tmp.0, long 1
;;------ Original instruction in 254.gap.llvm.bc:
;; %tmp.10 = seteq { int, [256 x sbyte], int, int, int, int }* %tmp.4, getelementptr ([16 x { int, [256 x sbyte], int, int, int, int }]* getelementptr ([16 x { int, [256 x sbyte], int, int, int, int }]* %OutputFiles, long 1), long 0, long 0)
;;------ Code sequence produced by preselection phase for above instr:
;; This code sequence is folded incorrectly by llc during selection
;; causing an assertion about a dynamic casting error.
%addrOfGlobal = getelementptr [16 x %FileType]* %OutputFiles, long 0
%constantGEP = getelementptr [16 x %FileType]* %addrOfGlobal, long 1
%constantGEP = getelementptr [16 x %FileType]* %constantGEP, long 0, long 0
%tmp.10 = seteq %FileType* %tmp.4, %constantGEP
br bool %tmp.10, label %return, label %endif.0
endif.0:
ret int 0
return:
ret int 1
}

View File

@ -1,60 +0,0 @@
; RUN: llvm-as -f %s -o - | llc
;; Date: May 28, 2003.
;; From: test/Programs/SingleSource/richards_benchmark.c
;; Function: struct task *handlerfn(struct packet *pkt)
;;
;; Error: PreSelection puts the arguments of the Phi just before
;; the Phi instead of in predecessor blocks. This later
;; causes llc to produces an invalid register <NULL VALUE>
;; for the phi arguments.
;;
;; PreSelection Output:
;; *** LLVM code after pre-selection for function handlerfn:
;;
;;
;; %struct..task* %handlerfn(%struct..packet*) {
;; ; <label>:0 ; No predecessors!
;; setne %struct..packet* %0, null ; <bool>:0 [#uses=1]
;; br bool %0, label %1, label %2
;;
;; ; <label>:1 ; preds = %0
;; br label %2
;;
;; ; <label>:2 ; preds = %0, %1
;; %addrOfGlobal = getelementptr int* %v2, long 0 ; <int*> [#uses=1]
;; %addrOfGlobal1 = getelementptr int* %v1, long 0 ; <int*> [#uses=1]
;; phi int* [ %addrOfGlobal, %1 ], [ %addrOfGlobal1, %0 ] ; <int*>:0 [#uses=1]
;; cast int* %0 to %struct..packet* ; <%struct..packet*>:1 [#uses=1]
;; call void %append( %struct..packet* %0, %struct..packet* %1 )
;; ret %struct..task* null
;; }
;; llc: ../../../include/llvm/CodeGen/MachineInstr.h:294: int MachineOperand::getAllocatedRegNum() const: Assertion `hasAllocatedReg()' failed.
;;
target endian = little
target pointersize = 32
%struct..packet = type { %struct..packet*, int, int, int, [4 x sbyte] }
%struct..task = type { %struct..task*, int, int, %struct..packet*, int, %struct..task* (%struct..packet*)*, int, int }
%v1 = external global int
%v2 = external global int
implementation ; Functions:
%struct..task* %handlerfn(%struct..packet* %pkt.2) {
entry: ; No predecessors!
%tmp.1 = setne %struct..packet* %pkt.2, null
br bool %tmp.1, label %cond_false, label %cond_continue
cond_false: ; preds = %entry
br label %cond_continue
cond_continue: ; preds = %entry, %cond_false
%mem_tmp.0 = phi int* [ %v2, %cond_false ], [ %v1, %entry ]
%tmp.12 = cast int* %mem_tmp.0 to %struct..packet*
call void %append( %struct..packet* %pkt.2, %struct..packet* %tmp.12 )
ret %struct..task* null
}
declare void %append(%struct..packet*, %struct..packet*)

View File

@ -1,79 +0,0 @@
; RUN: llvm-as -f %s -o - | llc
;; Date: May 28, 2003.
;; From: test/Programs/MultiSource/Olden-perimeter/maketree.c
;; Function: int CheckOutside(int x, int y)
;;
;; Note: The .ll code below for this regression test has identical
;; behavior to the above function up to the error, but then prints
;; true/false on the two branches.
;;
;; Error: llc generates a branch-on-xcc instead of branch-on-icc, which
;; is wrong because the value being compared (int euclid = x*x + y*y)
;; overflows, so that the 64-bit and 32-bit compares are not equal.
;;
;; LLC Output:
;;
;; !****** Outputing Function: CheckOutside_34 ******
;; .align 4
;; .global CheckOutside_34
;; .type CheckOutside_34, 2
;; CheckOutside_34:
;; .L_CheckOutside_34_LL_0:
;; save %o6, -192, %o6
;; mulx %i1, %i1, %i1
;; mulx %i0, %i0, %i0
;; sethi %lm(4194304), %o1
;; or %g0, 1, %o0
;; add %i0, %i1, %i0
;; sra %o1, 0, %o1
;; subcc %i0, %o1, %g0
;; bg %xcc, .L_CheckOutside_34_LL_3
;; nop
;; ba .L_CheckOutside_34_LL_1
;; nop
;; ...
;;
;;
target endian = little
target pointersize = 32
%.str_1 = internal constant [6 x sbyte] c"true\0A\00" ; <[6 x sbyte]*> [#uses=1]
%.str_2 = internal constant [7 x sbyte] c"false\0A\00" ; <[7 x sbyte]*> [#uses=1]
implementation ; Functions:
declare int %printf(sbyte*, ...)
internal void %__main() {
entry: ; No predecessors!
ret void
}
internal void %CheckOutside(int %x.1, int %y.1) {
entry: ; No predecessors!
%tmp.2 = mul int %x.1, %x.1 ; <int> [#uses=1]
%tmp.5 = mul int %y.1, %y.1 ; <int> [#uses=1]
%tmp.6 = add int %tmp.2, %tmp.5 ; <int> [#uses=1]
%tmp.8 = setle int %tmp.6, 4194304 ; <bool> [#uses=1]
br bool %tmp.8, label %then, label %else
then: ; preds = %entry
%tmp.11 = call int (sbyte*, ...)* %printf( sbyte* getelementptr ([6 x sbyte]* %.str_1, long 0, long 0) ) ; <int> [#uses=0]
br label %UnifiedExitNode
else: ; preds = %entry
%tmp.13 = call int (sbyte*, ...)* %printf( sbyte* getelementptr ([7 x sbyte]* %.str_2, long 0, long 0) ) ; <int> [#uses=0]
br label %UnifiedExitNode
UnifiedExitNode: ; preds = %then, %else
ret void
}
int %main() {
entry: ; No predecessors!
call void %__main( )
call void %CheckOutside( int 2097152, int 2097152 )
ret int 0
}

View File

@ -1,24 +0,0 @@
; RUN: llvm-as -f %s -o - | llc
target endian = big
target pointersize = 64
%.str_1 = internal constant [42 x sbyte] c" ui = %u (0x%x)\09\09UL-ui = %lld (0x%llx)\0A\00"
implementation ; Functions:
declare int %printf(sbyte*, ...)
internal ulong %getL() {
entry: ; No predecessors!
ret ulong 12659530247033960611
}
int %main(int %argc.1, sbyte** %argv.1) {
entry: ; No predecessors!
%tmp.11 = call ulong %getL( )
%tmp.5 = cast ulong %tmp.11 to uint
%tmp.23 = and ulong %tmp.11, 18446744069414584320
%tmp.16 = call int (sbyte*, ...)* %printf( sbyte* getelementptr ([42 x sbyte]* %.str_1, long 0, long 0), uint %tmp.5, uint %tmp.5, ulong %tmp.23, ulong %tmp.23 )
ret int 0
}

View File

@ -1,51 +0,0 @@
; RUN: llvm-as -f %s -o - | llc
;; Date: Jul 8, 2003.
;; From: test/Programs/MultiSource/Olden-perimeter
;; Function: int %adj(uint %d.1, uint %ct.1)
;;
;; Errors: (1) cast-int-to-bool was being treated as a NOP (i.e., the int
;; register was treated as effectively true if non-zero).
;; This cannot be used for later boolean operations.
;; (2) (A or NOT(B)) was being folded into A orn B, which is ok
;; for bitwise operations but not booleans! For booleans,
;; the result has to be compared with 0.
;;
;; LLC Output for the basic block (LLVM assembly is shown below):
;;
;; .L_adj_7_LL_4:
;; sethi 0, %i0
;; subcc %i1, 2, %g0
;; move %icc, 1, %i0
;; orn %i0, %i1, %i0
;; ba .L_adj_7_LL_5
;; nop
;;
target endian = big
target pointersize = 64
%.str_1 = internal constant [30 x sbyte] c"d = %d, ct = %d, d ^ ct = %d\0A\00"
implementation ; Functions:
declare int %printf(sbyte*, ...)
int %adj(uint %d.1, uint %ct.1) {
entry:
%tmp.19 = seteq uint %ct.1, 2
%tmp.22.not = cast uint %ct.1 to bool
%tmp.221 = xor bool %tmp.22.not, true
%tmp.26 = or bool %tmp.19, %tmp.221
%tmp.27 = cast bool %tmp.26 to int
ret int %tmp.27
}
int %main() {
entry:
%result = call int %adj(uint 3, uint 2)
%tmp.0 = call int (sbyte*, ...)* %printf( sbyte* getelementptr ([30 x sbyte]* %.str_1, long 0, long 0), uint 3, uint 2, int %result)
ret int 0
}

View File

@ -1,42 +0,0 @@
; RUN: llvm-as -f %s -o - | llc
;; Date: Jul 29, 2003.
;; From: test/Programs/MultiSource/Ptrdist-bc
;; Function: ---
;; Global: %yy_ec = internal constant [256 x sbyte] ...
;; A subset of this array is used in the test below.
;;
;; Error: Character '\07' was being emitted as '\a', at yy_ec[38].
;; When loaded, this returned the value 97 ('a'), instead of 7.
;;
;; Incorrect LLC Output for the array yy_ec was:
;; yy_ec_1094:
;; XFAIL: darwin
;; .ascii "\000\001\001\001\001\001\001\001\001\002\003\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\002\004\005\001\001\006\a\001\b\t\n\v\f\r\016\017\020\020\020\020\020\020\020\020\020\020\001\021\022\023\024\001\001\025\025\025\025\025\025\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\026\027\030\031\032\001\033\034\035\036\037 !\"#$%&'()*+,-./$0$1$234\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001"
;;
%yy_ec = internal constant [6 x sbyte] c"\06\07\01\08\01\09"
%.str_3 = internal constant [8 x sbyte] c"[%d] = \00"
%.str_4 = internal constant [4 x sbyte] c"%d\0A\00"
implementation
declare int %printf(sbyte*, ...)
int %main() {
entry:
br label %loopentry
loopentry:
%i = phi long [0, %entry], [%inc.i, %loopentry]
%cptr = getelementptr [6 x sbyte]* %yy_ec, long 0, long %i
%c = load sbyte* %cptr
%ignore = call int (sbyte*, ...)* %printf( sbyte* getelementptr ([8 x sbyte]* %.str_3, long 0, long 0), long %i)
%ignore2 = call int (sbyte*, ...)* %printf( sbyte* getelementptr ([4 x sbyte]* %.str_4, long 0, long 0), sbyte %c)
%inc.i = add long %i, 1
%done = setle long %inc.i, 5
br bool %done, label %loopentry, label %exit.1
exit.1:
ret int 0
};

View File

@ -1,832 +0,0 @@
; RUN: llvm-as -f %s -o - | llc
;; Register allocation is doing a very poor job on this routine from yyparse
;; in Burg:
;; -- at least two long-lived values are being allocated to %o? registers
;; -- even worse, those registers are being saved and restored repeatedly
;; at function calls, even though there are no intervening uses.
;; -- outgoing args of some function calls have to be swapped, causing
;; another write/read from stack to do the exchange (use -dregalloc=y).
;;
;; XFAIL: darwin
%Arity = type %struct.arity*
%Binding = type %struct.binding*
%DeltaCost = type [4 x short]
%Dimension = type %struct.dimension*
%Index_Map = type { int, %Item_Set* }
%IntList = type %struct.intlist*
%Item = type { %DeltaCost, %Rule }
%ItemArray = type %Item*
%Item_Set = type %struct.item_set*
%List = type %struct.list*
%Mapping = type %struct.mapping*
%NonTerminal = type %struct.nonterminal*
%Operator = type %struct.operator*
%Pattern = type %struct.pattern*
%PatternAST = type %struct.patternAST*
%Plank = type %struct.plank*
%PlankMap = type %struct.plankMap*
%ReadFn = type int ()*
%Rule = type %struct.rule*
%RuleAST = type %struct.ruleAST*
%StateMap = type %struct.stateMap*
%StrTableElement = type %struct.strTableElement*
%Symbol = type %struct.symbol*
%Table = type %struct.table*
%YYSTYPE = type { %IntList }
%struct.arity = type { int, %List }
%struct.binding = type { sbyte*, int }
%struct.dimension = type { short*, %Index_Map, %Mapping, int, %PlankMap }
%struct.index_map = type { int, %Item_Set* }
%struct.intlist = type { int, %IntList }
%struct.item = type { %DeltaCost, %Rule }
%struct.item_set = type { int, int, %Operator, [2 x %Item_Set], %Item_Set, short*, %ItemArray, %ItemArray }
%struct.list = type { sbyte*, %List }
%struct.mapping = type { %List*, int, int, int, %Item_Set* }
%struct.nonterminal = type { sbyte*, int, int, int, %PlankMap, %Rule }
%struct.operator = type { sbyte*, uint, int, int, int, int, %Table }
%struct.pattern = type { %NonTerminal, %Operator, [2 x %NonTerminal] }
%struct.patternAST = type { %Symbol, sbyte*, %List }
%struct.plank = type { sbyte*, %List, int }
%struct.plankMap = type { %List, int, %StateMap }
%struct.rule = type { %DeltaCost, int, int, int, %NonTerminal, %Pattern, uint }
%struct.ruleAST = type { sbyte*, %PatternAST, int, %IntList, %Rule, %StrTableElement, %StrTableElement }
%struct.stateMap = type { sbyte*, %Plank, int, short* }
%struct.strTableElement = type { sbyte*, %IntList, sbyte* }
%struct.symbol = type { sbyte*, int, { %Operator } }
%struct.table = type { %Operator, %List, short*, [2 x %Dimension], %Item_Set* }
%yylval = external global %YYSTYPE ; <%YYSTYPE*> [#uses=1]
%yylhs = external global [25 x short] ; <[25 x short]*> [#uses=1]
%yylen = external global [25 x short] ; <[25 x short]*> [#uses=1]
%yydefred = external global [43 x short] ; <[43 x short]*> [#uses=1]
%yydgoto = external global [12 x short] ; <[12 x short]*> [#uses=1]
%yysindex = external global [43 x short] ; <[43 x short]*> [#uses=2]
%yyrindex = external global [43 x short] ; <[43 x short]*> [#uses=1]
%yygindex = external global [12 x short] ; <[12 x short]*> [#uses=1]
%yytable = external global [263 x short] ; <[263 x short]*> [#uses=4]
%yycheck = external global [263 x short] ; <[263 x short]*> [#uses=4]
%yynerrs = external global int ; <int*> [#uses=3]
%yyerrflag = external global int ; <int*> [#uses=6]
%yychar = external global int ; <int*> [#uses=15]
%yyssp = external global short* ; <short**> [#uses=15]
%yyvsp = external global %YYSTYPE* ; <%YYSTYPE**> [#uses=30]
%yyval = external global %YYSTYPE ; <%YYSTYPE*> [#uses=1]
%yyss = external global short* ; <short**> [#uses=3]
%yysslim = external global short* ; <short**> [#uses=3]
%yyvs = external global %YYSTYPE* ; <%YYSTYPE**> [#uses=1]
%.LC01 = external global [13 x sbyte] ; <[13 x sbyte]*> [#uses=1]
%.LC1 = external global [20 x sbyte] ; <[20 x sbyte]*> [#uses=1]
implementation ; Functions:
int %yyparse() {
bb0: ; No predecessors!
store int 0, int* %yynerrs
store int 0, int* %yyerrflag
store int -1, int* %yychar
%reg113 = load short** %yyss ; <short*> [#uses=1]
%cond581 = setne short* %reg113, null ; <bool> [#uses=1]
br bool %cond581, label %bb3, label %bb2
bb2: ; preds = %bb0
%reg584 = call int %yygrowstack( ) ; <int> [#uses=1]
%cond584 = setne int %reg584, 0 ; <bool> [#uses=1]
br bool %cond584, label %bb113, label %bb3
bb3: ; preds = %bb2, %bb0
%reg115 = load short** %yyss ; <short*> [#uses=1]
store short* %reg115, short** %yyssp
%reg116 = load %YYSTYPE** %yyvs ; <%YYSTYPE*> [#uses=1]
store %YYSTYPE* %reg116, %YYSTYPE** %yyvsp
%reg117 = load short** %yyssp ; <short*> [#uses=1]
store short 0, short* %reg117
br label %bb4
bb4: ; preds = %bb14, %bb15, %bb31, %bb35, %bb102, %bb112, %bb3
%reg458 = phi uint [ %reg476, %bb112 ], [ 1, %bb102 ], [ %reg458, %bb35 ], [ %cast768, %bb31 ], [ %cast658, %bb15 ], [ %cast658, %bb14 ], [ 0, %bb3 ] ; <uint> [#uses=2]
%reg458-idxcast = cast uint %reg458 to long ; <long> [#uses=3]
%reg594 = getelementptr [43 x short]* %yydefred, long 0, long %reg458-idxcast ; <short*> [#uses=1]
%reg125 = load short* %reg594 ; <short> [#uses=1]
%cast599 = cast short %reg125 to int ; <int> [#uses=2]
%cond600 = setne int %cast599, 0 ; <bool> [#uses=1]
br bool %cond600, label %bb36, label %bb5
bb5: ; preds = %bb4
%reg127 = load int* %yychar ; <int> [#uses=1]
%cond603 = setge int %reg127, 0 ; <bool> [#uses=1]
br bool %cond603, label %bb8, label %bb6
bb6: ; preds = %bb5
%reg607 = call int %yylex( ) ; <int> [#uses=1]
store int %reg607, int* %yychar
%reg129 = load int* %yychar ; <int> [#uses=1]
%cond609 = setge int %reg129, 0 ; <bool> [#uses=1]
br bool %cond609, label %bb8, label %bb7
bb7: ; preds = %bb6
store int 0, int* %yychar
br label %bb8
bb8: ; preds = %bb7, %bb6, %bb5
%reg615 = getelementptr [43 x short]* %yysindex, long 0, long %reg458-idxcast ; <short*> [#uses=1]
%reg137 = load short* %reg615 ; <short> [#uses=1]
%cast620 = cast short %reg137 to int ; <int> [#uses=2]
%cond621 = seteq int %cast620, 0 ; <bool> [#uses=1]
br bool %cond621, label %bb16, label %bb9
bb9: ; preds = %bb8
%reg139 = load int* %yychar ; <int> [#uses=2]
%reg460 = add int %cast620, %reg139 ; <int> [#uses=3]
%cond624 = setlt int %reg460, 0 ; <bool> [#uses=1]
br bool %cond624, label %bb16, label %bb10
bb10: ; preds = %bb9
%cond627 = setgt int %reg460, 262 ; <bool> [#uses=1]
br bool %cond627, label %bb16, label %bb11
bb11: ; preds = %bb10
%reg460-idxcast = cast int %reg460 to long ; <long> [#uses=2]
%reg632 = getelementptr [263 x short]* %yycheck, long 0, long %reg460-idxcast ; <short*> [#uses=1]
%reg148 = load short* %reg632 ; <short> [#uses=1]
%cast637 = cast short %reg148 to int ; <int> [#uses=1]
%cond639 = setne int %cast637, %reg139 ; <bool> [#uses=1]
br bool %cond639, label %bb16, label %bb12
bb12: ; preds = %bb11
%reg150 = load short** %yyssp ; <short*> [#uses=1]
%cast640 = cast short* %reg150 to sbyte* ; <sbyte*> [#uses=1]
%reg151 = load short** %yysslim ; <short*> [#uses=1]
%cast641 = cast short* %reg151 to sbyte* ; <sbyte*> [#uses=1]
%cond642 = setlt sbyte* %cast640, %cast641 ; <bool> [#uses=1]
br bool %cond642, label %bb14, label %bb13
bb13: ; preds = %bb12
%reg644 = call int %yygrowstack( ) ; <int> [#uses=1]
%cond644 = setne int %reg644, 0 ; <bool> [#uses=1]
br bool %cond644, label %bb113, label %bb14
bb14: ; preds = %bb13, %bb12
%reg153 = load short** %yyssp ; <short*> [#uses=1]
%reg647 = getelementptr short* %reg153, long 1 ; <short*> [#uses=2]
store short* %reg647, short** %yyssp
%reg653 = getelementptr [263 x short]* %yytable, long 0, long %reg460-idxcast ; <short*> [#uses=1]
%reg162 = load short* %reg653 ; <short> [#uses=2]
%cast658 = cast short %reg162 to uint ; <uint> [#uses=2]
store short %reg162, short* %reg647
%reg164 = load %YYSTYPE** %yyvsp ; <%YYSTYPE*> [#uses=2]
%reg661 = getelementptr %YYSTYPE* %reg164, long 1 ; <%YYSTYPE*> [#uses=1]
store %YYSTYPE* %reg661, %YYSTYPE** %yyvsp
%reg167 = load %IntList* getelementptr (%YYSTYPE* %yylval, long 0, ubyte 0) ; <%IntList> [#uses=1]
%reg661.idx1 = getelementptr %YYSTYPE* %reg164, long 1, ubyte 0 ; <%IntList*> [#uses=1]
store %IntList %reg167, %IntList* %reg661.idx1
store int -1, int* %yychar
%reg169 = load int* %yyerrflag ; <int> [#uses=2]
%cond669 = setle int %reg169, 0 ; <bool> [#uses=1]
br bool %cond669, label %bb4, label %bb15
bb15: ; preds = %bb14
%reg171 = add int %reg169, -1 ; <int> [#uses=1]
store int %reg171, int* %yyerrflag
br label %bb4
bb16: ; preds = %bb11, %bb10, %bb9, %bb8
%reg677 = getelementptr [43 x short]* %yyrindex, long 0, long %reg458-idxcast ; <short*> [#uses=1]
%reg178 = load short* %reg677 ; <short> [#uses=1]
%cast682 = cast short %reg178 to int ; <int> [#uses=2]
%cond683 = seteq int %cast682, 0 ; <bool> [#uses=1]
br bool %cond683, label %bb21, label %bb17
bb17: ; preds = %bb16
%reg180 = load int* %yychar ; <int> [#uses=2]
%reg463 = add int %cast682, %reg180 ; <int> [#uses=3]
%cond686 = setlt int %reg463, 0 ; <bool> [#uses=1]
br bool %cond686, label %bb21, label %bb18
bb18: ; preds = %bb17
%cond689 = setgt int %reg463, 262 ; <bool> [#uses=1]
br bool %cond689, label %bb21, label %bb19
bb19: ; preds = %bb18
%reg463-idxcast = cast int %reg463 to long ; <long> [#uses=2]
%reg694 = getelementptr [263 x short]* %yycheck, long 0, long %reg463-idxcast ; <short*> [#uses=1]
%reg189 = load short* %reg694 ; <short> [#uses=1]
%cast699 = cast short %reg189 to int ; <int> [#uses=1]
%cond701 = setne int %cast699, %reg180 ; <bool> [#uses=1]
br bool %cond701, label %bb21, label %bb20
bb20: ; preds = %bb19
%reg704 = getelementptr [263 x short]* %yytable, long 0, long %reg463-idxcast ; <short*> [#uses=1]
%reg197 = load short* %reg704 ; <short> [#uses=1]
%cast709 = cast short %reg197 to int ; <int> [#uses=1]
br label %bb36
bb21: ; preds = %bb19, %bb18, %bb17, %bb16
%reg198 = load int* %yyerrflag ; <int> [#uses=1]
%cond711 = setne int %reg198, 0 ; <bool> [#uses=1]
br bool %cond711, label %bb23, label %bb22
bb22: ; preds = %bb21
call void %yyerror( sbyte* getelementptr ([13 x sbyte]* %.LC01, long 0, long 0) )
%reg200 = load int* %yynerrs ; <int> [#uses=1]
%reg201 = add int %reg200, 1 ; <int> [#uses=1]
store int %reg201, int* %yynerrs
br label %bb23
bb23: ; preds = %bb22, %bb21
%reg202 = load int* %yyerrflag ; <int> [#uses=1]
%cond719 = setgt int %reg202, 2 ; <bool> [#uses=1]
br bool %cond719, label %bb34, label %bb24
bb24: ; preds = %bb23
store int 3, int* %yyerrflag
%reg241 = load short** %yyss ; <short*> [#uses=1]
%cast778 = cast short* %reg241 to sbyte* ; <sbyte*> [#uses=1]
br label %bb25
bb25: ; preds = %bb33, %bb24
%reg204 = load short** %yyssp ; <short*> [#uses=4]
%reg206 = load short* %reg204 ; <short> [#uses=1]
%reg206-idxcast = cast short %reg206 to long ; <long> [#uses=1]
%reg727 = getelementptr [43 x short]* %yysindex, long 0, long %reg206-idxcast ; <short*> [#uses=1]
%reg212 = load short* %reg727 ; <short> [#uses=2]
%cast732 = cast short %reg212 to int ; <int> [#uses=2]
%cond733 = seteq int %cast732, 0 ; <bool> [#uses=1]
br bool %cond733, label %bb32, label %bb26
bb26: ; preds = %bb25
%reg466 = add int %cast732, 256 ; <int> [#uses=2]
%cond736 = setlt int %reg466, 0 ; <bool> [#uses=1]
br bool %cond736, label %bb32, label %bb27
bb27: ; preds = %bb26
%cond739 = setgt int %reg466, 262 ; <bool> [#uses=1]
br bool %cond739, label %bb32, label %bb28
bb28: ; preds = %bb27
%reg212-idxcast = cast short %reg212 to long ; <long> [#uses=1]
%reg212-idxcast-offset = add long %reg212-idxcast, 256 ; <long> [#uses=2]
%reg744 = getelementptr [263 x short]* %yycheck, long 0, long %reg212-idxcast-offset ; <short*> [#uses=1]
%reg221 = load short* %reg744 ; <short> [#uses=1]
%cond748 = setne short %reg221, 256 ; <bool> [#uses=1]
br bool %cond748, label %bb32, label %bb29
bb29: ; preds = %bb28
%cast750 = cast short* %reg204 to sbyte* ; <sbyte*> [#uses=1]
%reg223 = load short** %yysslim ; <short*> [#uses=1]
%cast751 = cast short* %reg223 to sbyte* ; <sbyte*> [#uses=1]
%cond752 = setlt sbyte* %cast750, %cast751 ; <bool> [#uses=1]
br bool %cond752, label %bb31, label %bb30
bb30: ; preds = %bb29
%reg754 = call int %yygrowstack( ) ; <int> [#uses=1]
%cond754 = setne int %reg754, 0 ; <bool> [#uses=1]
br bool %cond754, label %bb113, label %bb31
bb31: ; preds = %bb30, %bb29
%reg225 = load short** %yyssp ; <short*> [#uses=1]
%reg757 = getelementptr short* %reg225, long 1 ; <short*> [#uses=2]
store short* %reg757, short** %yyssp
%reg763 = getelementptr [263 x short]* %yytable, long 0, long %reg212-idxcast-offset ; <short*> [#uses=1]
%reg234 = load short* %reg763 ; <short> [#uses=2]
%cast768 = cast short %reg234 to uint ; <uint> [#uses=1]
store short %reg234, short* %reg757
%reg236 = load %YYSTYPE** %yyvsp ; <%YYSTYPE*> [#uses=2]
%reg771 = getelementptr %YYSTYPE* %reg236, long 1 ; <%YYSTYPE*> [#uses=1]
store %YYSTYPE* %reg771, %YYSTYPE** %yyvsp
%reg239 = load %IntList* getelementptr (%YYSTYPE* %yylval, long 0, ubyte 0) ; <%IntList> [#uses=1]
%reg771.idx1 = getelementptr %YYSTYPE* %reg236, long 1, ubyte 0 ; <%IntList*> [#uses=1]
store %IntList %reg239, %IntList* %reg771.idx1
br label %bb4
bb32: ; preds = %bb28, %bb27, %bb26, %bb25
%cast777 = cast short* %reg204 to sbyte* ; <sbyte*> [#uses=1]
%cond779 = setle sbyte* %cast777, %cast778 ; <bool> [#uses=1]
br bool %cond779, label %UnifiedExitNode, label %bb33
bb33: ; preds = %bb32
%reg781 = getelementptr short* %reg204, long -1 ; <short*> [#uses=1]
store short* %reg781, short** %yyssp
%reg244 = load %YYSTYPE** %yyvsp ; <%YYSTYPE*> [#uses=1]
%reg786 = getelementptr %YYSTYPE* %reg244, long -1 ; <%YYSTYPE*> [#uses=1]
store %YYSTYPE* %reg786, %YYSTYPE** %yyvsp
br label %bb25
bb34: ; preds = %bb23
%reg246 = load int* %yychar ; <int> [#uses=1]
%cond791 = seteq int %reg246, 0 ; <bool> [#uses=1]
br bool %cond791, label %UnifiedExitNode, label %bb35
bb35: ; preds = %bb34
store int -1, int* %yychar
br label %bb4
bb36: ; preds = %bb20, %bb4
%reg468 = phi int [ %cast709, %bb20 ], [ %cast599, %bb4 ] ; <int> [#uses=31]
%reg468-idxcast = cast int %reg468 to long ; <long> [#uses=2]
%reg796 = getelementptr [25 x short]* %yylen, long 0, long %reg468-idxcast ; <short*> [#uses=1]
%reg254 = load short* %reg796 ; <short> [#uses=2]
%reg259 = load %YYSTYPE** %yyvsp ; <%YYSTYPE*> [#uses=1]
%reg254-idxcast = cast short %reg254 to long ; <long> [#uses=1]
%reg254-idxcast-scale = mul long %reg254-idxcast, -1 ; <long> [#uses=1]
%reg254-idxcast-scale-offset = add long %reg254-idxcast-scale, 1 ; <long> [#uses=1]
%reg261.idx1 = getelementptr %YYSTYPE* %reg259, long %reg254-idxcast-scale-offset, ubyte 0 ; <%IntList*> [#uses=1]
%reg261 = load %IntList* %reg261.idx1 ; <%IntList> [#uses=1]
store %IntList %reg261, %IntList* getelementptr (%YYSTYPE* %yyval, long 0, ubyte 0)
%cond812 = seteq int %reg468, 13 ; <bool> [#uses=1]
br bool %cond812, label %bb85, label %bb37
bb37: ; preds = %bb36
%cond814 = setgt int %reg468, 13 ; <bool> [#uses=1]
br bool %cond814, label %bb56, label %bb38
bb38: ; preds = %bb37
%cond817 = seteq int %reg468, 7 ; <bool> [#uses=1]
br bool %cond817, label %bb79, label %bb39
bb39: ; preds = %bb38
%cond819 = setgt int %reg468, 7 ; <bool> [#uses=1]
br bool %cond819, label %bb48, label %bb40
bb40: ; preds = %bb39
%cond822 = seteq int %reg468, 4 ; <bool> [#uses=1]
br bool %cond822, label %bb76, label %bb41
bb41: ; preds = %bb40
%cond824 = setgt int %reg468, 4 ; <bool> [#uses=1]
br bool %cond824, label %bb45, label %bb42
bb42: ; preds = %bb41
%cond827 = seteq int %reg468, 2 ; <bool> [#uses=1]
br bool %cond827, label %bb74, label %bb43
bb43: ; preds = %bb42
%cond829 = seteq int %reg468, 3 ; <bool> [#uses=1]
br bool %cond829, label %bb75, label %bb97
bb45: ; preds = %bb41
%cond831 = seteq int %reg468, 5 ; <bool> [#uses=1]
br bool %cond831, label %bb77, label %bb46
bb46: ; preds = %bb45
%cond833 = seteq int %reg468, 6 ; <bool> [#uses=1]
br bool %cond833, label %bb78, label %bb97
bb48: ; preds = %bb39
%cond835 = seteq int %reg468, 10 ; <bool> [#uses=1]
br bool %cond835, label %bb82, label %bb49
bb49: ; preds = %bb48
%cond837 = setgt int %reg468, 10 ; <bool> [#uses=1]
br bool %cond837, label %bb53, label %bb50
bb50: ; preds = %bb49
%cond840 = seteq int %reg468, 8 ; <bool> [#uses=1]
br bool %cond840, label %bb80, label %bb51
bb51: ; preds = %bb50
%cond842 = seteq int %reg468, 9 ; <bool> [#uses=1]
br bool %cond842, label %bb81, label %bb97
bb53: ; preds = %bb49
%cond844 = seteq int %reg468, 11 ; <bool> [#uses=1]
br bool %cond844, label %bb83, label %bb54
bb54: ; preds = %bb53
%cond846 = seteq int %reg468, 12 ; <bool> [#uses=1]
br bool %cond846, label %bb84, label %bb97
bb56: ; preds = %bb37
%cond848 = seteq int %reg468, 19 ; <bool> [#uses=1]
br bool %cond848, label %bb91, label %bb57
bb57: ; preds = %bb56
%cond850 = setgt int %reg468, 19 ; <bool> [#uses=1]
br bool %cond850, label %bb66, label %bb58
bb58: ; preds = %bb57
%cond853 = seteq int %reg468, 16 ; <bool> [#uses=1]
br bool %cond853, label %bb88, label %bb59
bb59: ; preds = %bb58
%cond855 = setgt int %reg468, 16 ; <bool> [#uses=1]
br bool %cond855, label %bb63, label %bb60
bb60: ; preds = %bb59
%cond858 = seteq int %reg468, 14 ; <bool> [#uses=1]
br bool %cond858, label %bb86, label %bb61
bb61: ; preds = %bb60
%cond860 = seteq int %reg468, 15 ; <bool> [#uses=1]
br bool %cond860, label %bb87, label %bb97
bb63: ; preds = %bb59
%cond862 = seteq int %reg468, 17 ; <bool> [#uses=1]
br bool %cond862, label %bb89, label %bb64
bb64: ; preds = %bb63
%cond864 = seteq int %reg468, 18 ; <bool> [#uses=1]
br bool %cond864, label %bb90, label %bb97
bb66: ; preds = %bb57
%cond866 = seteq int %reg468, 22 ; <bool> [#uses=1]
br bool %cond866, label %bb94, label %bb67
bb67: ; preds = %bb66
%cond868 = setgt int %reg468, 22 ; <bool> [#uses=1]
br bool %cond868, label %bb71, label %bb68
bb68: ; preds = %bb67
%cond871 = seteq int %reg468, 20 ; <bool> [#uses=1]
br bool %cond871, label %bb92, label %bb69
bb69: ; preds = %bb68
%cond873 = seteq int %reg468, 21 ; <bool> [#uses=1]
br bool %cond873, label %bb93, label %bb97
bb71: ; preds = %bb67
%cond875 = seteq int %reg468, 23 ; <bool> [#uses=1]
br bool %cond875, label %bb95, label %bb72
bb72: ; preds = %bb71
%cond877 = seteq int %reg468, 24 ; <bool> [#uses=1]
br bool %cond877, label %bb96, label %bb97
bb74: ; preds = %bb42
call void %yyfinished( )
br label %bb97
bb75: ; preds = %bb43
%reg262 = load %YYSTYPE** %yyvsp ; <%YYSTYPE*> [#uses=2]
%reg264.idx1 = getelementptr %YYSTYPE* %reg262, long -2, ubyte 0 ; <%IntList*> [#uses=1]
%reg264 = load %IntList* %reg264.idx1 ; <%IntList> [#uses=1]
%reg265.idx = getelementptr %YYSTYPE* %reg262, long 0, ubyte 0 ; <%IntList*> [#uses=1]
%reg265 = load %IntList* %reg265.idx ; <%IntList> [#uses=1]
%cast889 = cast %IntList %reg265 to %List ; <%List> [#uses=1]
%cast890 = cast %IntList %reg264 to %List ; <%List> [#uses=1]
call void %doSpec( %List %cast890, %List %cast889 )
br label %bb97
bb76: ; preds = %bb40
store %IntList null, %IntList* getelementptr (%YYSTYPE* %yyval, long 0, ubyte 0)
br label %bb97
bb77: ; preds = %bb45
%reg269 = load %YYSTYPE** %yyvsp ; <%YYSTYPE*> [#uses=2]
%cast894 = getelementptr %YYSTYPE* %reg269, long 0, ubyte 0 ; <%IntList*> [#uses=1]
%reg271 = load %IntList* %cast894 ; <%IntList> [#uses=1]
%reg271 = cast %IntList %reg271 to sbyte* ; <sbyte*> [#uses=1]
%reg272.idx1 = getelementptr %YYSTYPE* %reg269, long -1, ubyte 0 ; <%IntList*> [#uses=1]
%reg272 = load %IntList* %reg272.idx1 ; <%IntList> [#uses=1]
%cast901 = cast %IntList %reg272 to %List ; <%List> [#uses=1]
%reg901 = call %List %newList( sbyte* %reg271, %List %cast901 ) ; <%List> [#uses=1]
cast %List %reg901 to %IntList ; <%IntList>:0 [#uses=1]
store %IntList %0, %IntList* getelementptr (%YYSTYPE* %yyval, long 0, ubyte 0)
br label %bb97
bb78: ; preds = %bb46
%reg275 = load %YYSTYPE** %yyvsp ; <%YYSTYPE*> [#uses=1]
%reg277.idx = getelementptr %YYSTYPE* %reg275, long 0, ubyte 0 ; <%IntList*> [#uses=1]
%reg277 = load %IntList* %reg277.idx ; <%IntList> [#uses=1]
%cast907 = cast %IntList %reg277 to %List ; <%List> [#uses=1]
%reg907 = call %Arity %newArity( int -1, %List %cast907 ) ; <%Arity> [#uses=1]
cast %Arity %reg907 to %IntList ; <%IntList>:1 [#uses=1]
store %IntList %1, %IntList* getelementptr (%YYSTYPE* %yyval, long 0, ubyte 0)
br label %bb97
bb79: ; preds = %bb38
store %IntList null, %IntList* getelementptr (%YYSTYPE* %yyval, long 0, ubyte 0)
%reg281 = load %YYSTYPE** %yyvsp ; <%YYSTYPE*> [#uses=1]
%cast912 = getelementptr %YYSTYPE* %reg281, long 0, ubyte 0 ; <%IntList*> [#uses=1]
%reg282 = load %IntList* %cast912 ; <%IntList> [#uses=1]
%reg282 = cast %IntList %reg282 to %List ; <%List> [#uses=1]
call void %doGram( %List %reg282 )
br label %bb97
bb80: ; preds = %bb50
store %IntList null, %IntList* getelementptr (%YYSTYPE* %yyval, long 0, ubyte 0)
%reg285 = load %YYSTYPE** %yyvsp ; <%YYSTYPE*> [#uses=1]
%cast917 = getelementptr %YYSTYPE* %reg285, long 0, ubyte 0 ; <%IntList*> [#uses=1]
%reg286 = load %IntList* %cast917 ; <%IntList> [#uses=1]
%reg286 = cast %IntList %reg286 to sbyte* ; <sbyte*> [#uses=1]
call void %doStart( sbyte* %reg286 )
br label %bb97
bb81: ; preds = %bb51
store %IntList null, %IntList* getelementptr (%YYSTYPE* %yyval, long 0, ubyte 0)
br label %bb97
bb82: ; preds = %bb48
%reg290 = load %YYSTYPE** %yyvsp ; <%YYSTYPE*> [#uses=2]
%cast923 = getelementptr %YYSTYPE* %reg290, long 0, ubyte 0 ; <%IntList*> [#uses=1]
%reg292 = load %IntList* %cast923 ; <%IntList> [#uses=1]
%reg292 = cast %IntList %reg292 to sbyte* ; <sbyte*> [#uses=1]
%reg293.idx1 = getelementptr %YYSTYPE* %reg290, long -1, ubyte 0 ; <%IntList*> [#uses=1]
%reg293 = load %IntList* %reg293.idx1 ; <%IntList> [#uses=1]
%cast930 = cast %IntList %reg293 to %List ; <%List> [#uses=1]
%reg930 = call %List %newList( sbyte* %reg292, %List %cast930 ) ; <%List> [#uses=1]
cast %List %reg930 to %IntList ; <%IntList>:2 [#uses=1]
store %IntList %2, %IntList* getelementptr (%YYSTYPE* %yyval, long 0, ubyte 0)
br label %bb97
bb83: ; preds = %bb53
store %IntList null, %IntList* getelementptr (%YYSTYPE* %yyval, long 0, ubyte 0)
br label %bb97
bb84: ; preds = %bb54
%reg298 = load %YYSTYPE** %yyvsp ; <%YYSTYPE*> [#uses=2]
%cast936 = getelementptr %YYSTYPE* %reg298, long 0, ubyte 0 ; <%IntList*> [#uses=1]
%reg300 = load %IntList* %cast936 ; <%IntList> [#uses=1]
%reg300 = cast %IntList %reg300 to sbyte* ; <sbyte*> [#uses=1]
%reg301.idx1 = getelementptr %YYSTYPE* %reg298, long -1, ubyte 0 ; <%IntList*> [#uses=1]
%reg301 = load %IntList* %reg301.idx1 ; <%IntList> [#uses=1]
%cast943 = cast %IntList %reg301 to %List ; <%List> [#uses=1]
%reg943 = call %List %newList( sbyte* %reg300, %List %cast943 ) ; <%List> [#uses=1]
cast %List %reg943 to %IntList ; <%IntList>:3 [#uses=1]
store %IntList %3, %IntList* getelementptr (%YYSTYPE* %yyval, long 0, ubyte 0)
br label %bb97
bb85: ; preds = %bb36
%reg304 = load %YYSTYPE** %yyvsp ; <%YYSTYPE*> [#uses=2]
%cast9521 = getelementptr %YYSTYPE* %reg304, long -2, ubyte 0 ; <%IntList*> [#uses=1]
%reg306 = load %IntList* %cast9521 ; <%IntList> [#uses=1]
%reg306 = cast %IntList %reg306 to sbyte* ; <sbyte*> [#uses=1]
%cast953 = cast %YYSTYPE* %reg304 to int* ; <int*> [#uses=1]
%reg307 = load int* %cast953 ; <int> [#uses=1]
%reg955 = call %Binding %newBinding( sbyte* %reg306, int %reg307 ) ; <%Binding> [#uses=1]
cast %Binding %reg955 to %IntList ; <%IntList>:4 [#uses=1]
store %IntList %4, %IntList* getelementptr (%YYSTYPE* %yyval, long 0, ubyte 0)
br label %bb97
bb86: ; preds = %bb60
store %IntList null, %IntList* getelementptr (%YYSTYPE* %yyval, long 0, ubyte 0)
br label %bb97
bb87: ; preds = %bb61
%reg312 = load %YYSTYPE** %yyvsp ; <%YYSTYPE*> [#uses=2]
%cast961 = getelementptr %YYSTYPE* %reg312, long 0, ubyte 0 ; <%IntList*> [#uses=1]
%reg314 = load %IntList* %cast961 ; <%IntList> [#uses=1]
%reg314 = cast %IntList %reg314 to sbyte* ; <sbyte*> [#uses=1]
%reg315.idx1 = getelementptr %YYSTYPE* %reg312, long -1, ubyte 0 ; <%IntList*> [#uses=1]
%reg315 = load %IntList* %reg315.idx1 ; <%IntList> [#uses=1]
%cast968 = cast %IntList %reg315 to %List ; <%List> [#uses=1]
%reg968 = call %List %newList( sbyte* %reg314, %List %cast968 ) ; <%List> [#uses=1]
cast %List %reg968 to %IntList ; <%IntList>:5 [#uses=1]
store %IntList %5, %IntList* getelementptr (%YYSTYPE* %yyval, long 0, ubyte 0)
br label %bb97
bb88: ; preds = %bb58
%reg318 = load %YYSTYPE** %yyvsp ; <%YYSTYPE*> [#uses=4]
%cast9791 = getelementptr %YYSTYPE* %reg318, long -6, ubyte 0 ; <%IntList*> [#uses=1]
%reg322 = load %IntList* %cast9791 ; <%IntList> [#uses=1]
%reg322 = cast %IntList %reg322 to sbyte* ; <sbyte*> [#uses=1]
%reg323.idx1 = getelementptr %YYSTYPE* %reg318, long -4, ubyte 0 ; <%IntList*> [#uses=1]
%reg323 = load %IntList* %reg323.idx1 ; <%IntList> [#uses=1]
%reg987 = getelementptr %YYSTYPE* %reg318, long -2 ; <%YYSTYPE*> [#uses=1]
%cast989 = cast %YYSTYPE* %reg987 to int* ; <int*> [#uses=1]
%reg324 = load int* %cast989 ; <int> [#uses=1]
%reg325.idx1 = getelementptr %YYSTYPE* %reg318, long -1, ubyte 0 ; <%IntList*> [#uses=1]
%reg325 = load %IntList* %reg325.idx1 ; <%IntList> [#uses=1]
%cast998 = cast %IntList %reg323 to %PatternAST ; <%PatternAST> [#uses=1]
%reg996 = call %RuleAST %newRuleAST( sbyte* %reg322, %PatternAST %cast998, int %reg324, %IntList %reg325 ) ; <%RuleAST> [#uses=1]
cast %RuleAST %reg996 to %IntList ; <%IntList>:6 [#uses=1]
store %IntList %6, %IntList* getelementptr (%YYSTYPE* %yyval, long 0, ubyte 0)
br label %bb97
bb89: ; preds = %bb63
%reg328 = load %YYSTYPE** %yyvsp ; <%YYSTYPE*> [#uses=1]
%cast1002 = getelementptr %YYSTYPE* %reg328, long 0, ubyte 0 ; <%IntList*> [#uses=1]
%reg329 = load %IntList* %cast1002 ; <%IntList> [#uses=1]
%reg329 = cast %IntList %reg329 to sbyte* ; <sbyte*> [#uses=1]
%reg1004 = call %PatternAST %newPatternAST( sbyte* %reg329, %List null ) ; <%PatternAST> [#uses=1]
cast %PatternAST %reg1004 to %IntList ; <%IntList>:7 [#uses=1]
store %IntList %7, %IntList* getelementptr (%YYSTYPE* %yyval, long 0, ubyte 0)
br label %bb97
bb90: ; preds = %bb64
%reg333 = load %YYSTYPE** %yyvsp ; <%YYSTYPE*> [#uses=2]
%cast10131 = getelementptr %YYSTYPE* %reg333, long -1, ubyte 0 ; <%IntList*> [#uses=1]
%reg335 = load %IntList* %cast10131 ; <%IntList> [#uses=1]
%reg335 = cast %IntList %reg335 to sbyte* ; <sbyte*> [#uses=1]
%reg1015 = call %List %newList( sbyte* %reg335, %List null ) ; <%List> [#uses=1]
%cast10211 = getelementptr %YYSTYPE* %reg333, long -3, ubyte 0 ; <%IntList*> [#uses=1]
%reg338 = load %IntList* %cast10211 ; <%IntList> [#uses=1]
%reg338 = cast %IntList %reg338 to sbyte* ; <sbyte*> [#uses=1]
%reg1023 = call %PatternAST %newPatternAST( sbyte* %reg338, %List %reg1015 ) ; <%PatternAST> [#uses=1]
cast %PatternAST %reg1023 to %IntList ; <%IntList>:8 [#uses=1]
store %IntList %8, %IntList* getelementptr (%YYSTYPE* %yyval, long 0, ubyte 0)
br label %bb97
bb91: ; preds = %bb56
%reg341 = load %YYSTYPE** %yyvsp ; <%YYSTYPE*> [#uses=3]
%cast10331 = getelementptr %YYSTYPE* %reg341, long -1, ubyte 0 ; <%IntList*> [#uses=1]
%reg344 = load %IntList* %cast10331 ; <%IntList> [#uses=1]
%reg344 = cast %IntList %reg344 to sbyte* ; <sbyte*> [#uses=1]
%reg1035 = call %List %newList( sbyte* %reg344, %List null ) ; <%List> [#uses=1]
%cast10411 = getelementptr %YYSTYPE* %reg341, long -3, ubyte 0 ; <%IntList*> [#uses=1]
%reg347 = load %IntList* %cast10411 ; <%IntList> [#uses=1]
%reg347 = cast %IntList %reg347 to sbyte* ; <sbyte*> [#uses=1]
%reg1043 = call %List %newList( sbyte* %reg347, %List %reg1035 ) ; <%List> [#uses=1]
%cast10491 = getelementptr %YYSTYPE* %reg341, long -5, ubyte 0 ; <%IntList*> [#uses=1]
%reg349 = load %IntList* %cast10491 ; <%IntList> [#uses=1]
%reg349 = cast %IntList %reg349 to sbyte* ; <sbyte*> [#uses=1]
%reg1051 = call %PatternAST %newPatternAST( sbyte* %reg349, %List %reg1043 ) ; <%PatternAST> [#uses=1]
cast %PatternAST %reg1051 to %IntList ; <%IntList>:9 [#uses=1]
store %IntList %9, %IntList* getelementptr (%YYSTYPE* %yyval, long 0, ubyte 0)
br label %bb97
bb92: ; preds = %bb68
store %IntList null, %IntList* getelementptr (%YYSTYPE* %yyval, long 0, ubyte 0)
br label %bb97
bb93: ; preds = %bb69
%reg354 = load %YYSTYPE** %yyvsp ; <%YYSTYPE*> [#uses=2]
%reg1059 = getelementptr %YYSTYPE* %reg354, long -2 ; <%YYSTYPE*> [#uses=1]
%cast1061 = cast %YYSTYPE* %reg1059 to int* ; <int*> [#uses=1]
%reg356 = load int* %cast1061 ; <int> [#uses=1]
%reg357.idx1 = getelementptr %YYSTYPE* %reg354, long -1, ubyte 0 ; <%IntList*> [#uses=1]
%reg357 = load %IntList* %reg357.idx1 ; <%IntList> [#uses=1]
%reg1068 = call %IntList %newIntList( int %reg356, %IntList %reg357 ) ; <%IntList> [#uses=1]
store %IntList %reg1068, %IntList* getelementptr (%YYSTYPE* %yyval, long 0, ubyte 0)
br label %bb97
bb94: ; preds = %bb66
store %IntList null, %IntList* getelementptr (%YYSTYPE* %yyval, long 0, ubyte 0)
br label %bb97
bb95: ; preds = %bb71
%reg362 = load %YYSTYPE** %yyvsp ; <%YYSTYPE*> [#uses=2]
%reg1076 = getelementptr %YYSTYPE* %reg362, long -1 ; <%YYSTYPE*> [#uses=1]
%cast1078 = cast %YYSTYPE* %reg1076 to int* ; <int*> [#uses=1]
%reg364 = load int* %cast1078 ; <int> [#uses=1]
%reg365.idx = getelementptr %YYSTYPE* %reg362, long 0, ubyte 0 ; <%IntList*> [#uses=1]
%reg365 = load %IntList* %reg365.idx ; <%IntList> [#uses=1]
%reg1081 = call %IntList %newIntList( int %reg364, %IntList %reg365 ) ; <%IntList> [#uses=1]
store %IntList %reg1081, %IntList* getelementptr (%YYSTYPE* %yyval, long 0, ubyte 0)
br label %bb97
bb96: ; preds = %bb72
%reg368 = load %YYSTYPE** %yyvsp ; <%YYSTYPE*> [#uses=2]
%reg1088 = getelementptr %YYSTYPE* %reg368, long -1 ; <%YYSTYPE*> [#uses=1]
%cast1090 = cast %YYSTYPE* %reg1088 to int* ; <int*> [#uses=1]
%reg370 = load int* %cast1090 ; <int> [#uses=1]
%reg371.idx = getelementptr %YYSTYPE* %reg368, long 0, ubyte 0 ; <%IntList*> [#uses=1]
%reg371 = load %IntList* %reg371.idx ; <%IntList> [#uses=1]
%reg1093 = call %IntList %newIntList( int %reg370, %IntList %reg371 ) ; <%IntList> [#uses=1]
store %IntList %reg1093, %IntList* getelementptr (%YYSTYPE* %yyval, long 0, ubyte 0)
br label %bb97
bb97: ; preds = %bb96, %bb95, %bb94, %bb93, %bb92, %bb91, %bb90, %bb89, %bb88, %bb87, %bb86, %bb85, %bb84, %bb83, %bb82, %bb81, %bb80, %bb79, %bb78, %bb77, %bb76, %bb75, %bb74, %bb72, %bb69, %bb64, %bb61, %bb54, %bb51, %bb46, %bb43
%cast1097 = cast short %reg254 to ulong ; <ulong> [#uses=3]
%reg375 = add ulong %cast1097, %cast1097 ; <ulong> [#uses=1]
%reg377 = load short** %yyssp ; <short*> [#uses=1]
%cast379 = cast short* %reg377 to ulong ; <ulong> [#uses=1]
%reg381 = sub ulong %cast379, %reg375 ; <ulong> [#uses=1]
%cast1099 = cast ulong %reg381 to short* ; <short*> [#uses=1]
store short* %cast1099, short** %yyssp
%reg382 = load short** %yyssp ; <short*> [#uses=3]
%reg383 = load short* %reg382 ; <short> [#uses=1]
%cast1103 = cast short %reg383 to int ; <int> [#uses=3]
%reg385 = mul ulong %cast1097, 8 ; <ulong> [#uses=1]
%reg387 = load %YYSTYPE** %yyvsp ; <%YYSTYPE*> [#uses=1]
%cast389 = cast %YYSTYPE* %reg387 to ulong ; <ulong> [#uses=1]
%reg391 = sub ulong %cast389, %reg385 ; <ulong> [#uses=1]
%cast1108 = cast ulong %reg391 to %YYSTYPE* ; <%YYSTYPE*> [#uses=1]
store %YYSTYPE* %cast1108, %YYSTYPE** %yyvsp
%reg1111 = getelementptr [25 x short]* %yylhs, long 0, long %reg468-idxcast ; <short*> [#uses=1]
%reg398 = load short* %reg1111 ; <short> [#uses=2]
%cast1116 = cast short %reg398 to int ; <int> [#uses=1]
%cond1117 = setne int %cast1103, 0 ; <bool> [#uses=1]
br bool %cond1117, label %bb104, label %bb98
bb98: ; preds = %bb97
%cond1119 = setne int %cast1116, 0 ; <bool> [#uses=1]
br bool %cond1119, label %bb104, label %bb99
bb99: ; preds = %bb98
%reg1122 = getelementptr short* %reg382, long 1 ; <short*> [#uses=2]
store short* %reg1122, short** %yyssp
store short 1, short* %reg1122
%reg403 = load %YYSTYPE** %yyvsp ; <%YYSTYPE*> [#uses=2]
%reg1128 = getelementptr %YYSTYPE* %reg403, long 1 ; <%YYSTYPE*> [#uses=1]
store %YYSTYPE* %reg1128, %YYSTYPE** %yyvsp
%reg406 = load %IntList* getelementptr (%YYSTYPE* %yyval, long 0, ubyte 0) ; <%IntList> [#uses=1]
%reg1128.idx1 = getelementptr %YYSTYPE* %reg403, long 1, ubyte 0 ; <%IntList*> [#uses=1]
store %IntList %reg406, %IntList* %reg1128.idx1
%reg407 = load int* %yychar ; <int> [#uses=1]
%cond1135 = setge int %reg407, 0 ; <bool> [#uses=1]
br bool %cond1135, label %bb102, label %bb100
bb100: ; preds = %bb99
%reg1139 = call int %yylex( ) ; <int> [#uses=1]
store int %reg1139, int* %yychar
%reg409 = load int* %yychar ; <int> [#uses=1]
%cond1141 = setge int %reg409, 0 ; <bool> [#uses=1]
br bool %cond1141, label %bb102, label %bb101
bb101: ; preds = %bb100
store int 0, int* %yychar
br label %bb102
bb102: ; preds = %bb101, %bb100, %bb99
%reg411 = load int* %yychar ; <int> [#uses=1]
%cond1146 = setne int %reg411, 0 ; <bool> [#uses=1]
br bool %cond1146, label %bb4, label %UnifiedExitNode
bb104: ; preds = %bb98, %bb97
%reg398-idxcast = cast short %reg398 to long ; <long> [#uses=2]
%reg1150 = getelementptr [12 x short]* %yygindex, long 0, long %reg398-idxcast ; <short*> [#uses=1]
%reg418 = load short* %reg1150 ; <short> [#uses=1]
%cast1155 = cast short %reg418 to int ; <int> [#uses=2]
%cond1156 = seteq int %cast1155, 0 ; <bool> [#uses=1]
br bool %cond1156, label %bb109, label %bb105
bb105: ; preds = %bb104
%reg473 = add int %cast1155, %cast1103 ; <int> [#uses=3]
%cond1158 = setlt int %reg473, 0 ; <bool> [#uses=1]
br bool %cond1158, label %bb109, label %bb106
bb106: ; preds = %bb105
%cond1161 = setgt int %reg473, 262 ; <bool> [#uses=1]
br bool %cond1161, label %bb109, label %bb107
bb107: ; preds = %bb106
%reg473-idxcast = cast int %reg473 to long ; <long> [#uses=2]
%reg1166 = getelementptr [263 x short]* %yycheck, long 0, long %reg473-idxcast ; <short*> [#uses=1]
%reg428 = load short* %reg1166 ; <short> [#uses=1]
%cast1171 = cast short %reg428 to int ; <int> [#uses=1]
%cond1172 = setne int %cast1171, %cast1103 ; <bool> [#uses=1]
br bool %cond1172, label %bb109, label %bb108
bb108: ; preds = %bb107
%reg1175 = getelementptr [263 x short]* %yytable, long 0, long %reg473-idxcast ; <short*> [#uses=1]
%reg435 = load short* %reg1175 ; <short> [#uses=1]
%cast1180 = cast short %reg435 to uint ; <uint> [#uses=1]
br label %bb110
bb109: ; preds = %bb107, %bb106, %bb105, %bb104
%reg1183 = getelementptr [12 x short]* %yydgoto, long 0, long %reg398-idxcast ; <short*> [#uses=1]
%reg442 = load short* %reg1183 ; <short> [#uses=1]
%cast1188 = cast short %reg442 to uint ; <uint> [#uses=1]
br label %bb110
bb110: ; preds = %bb109, %bb108
%reg476 = phi uint [ %cast1188, %bb109 ], [ %cast1180, %bb108 ] ; <uint> [#uses=2]
%cast1189 = cast short* %reg382 to sbyte* ; <sbyte*> [#uses=1]
%reg444 = load short** %yysslim ; <short*> [#uses=1]
%cast1190 = cast short* %reg444 to sbyte* ; <sbyte*> [#uses=1]
%cond1191 = setlt sbyte* %cast1189, %cast1190 ; <bool> [#uses=1]
br bool %cond1191, label %bb112, label %bb111
bb111: ; preds = %bb110
%reg1193 = call int %yygrowstack( ) ; <int> [#uses=1]
%cond1193 = setne int %reg1193, 0 ; <bool> [#uses=1]
br bool %cond1193, label %bb113, label %bb112
bb112: ; preds = %bb111, %bb110
%reg446 = load short** %yyssp ; <short*> [#uses=1]
%reg1196 = getelementptr short* %reg446, long 1 ; <short*> [#uses=2]
store short* %reg1196, short** %yyssp
%cast1357 = cast uint %reg476 to short ; <short> [#uses=1]
store short %cast1357, short* %reg1196
%reg449 = load %YYSTYPE** %yyvsp ; <%YYSTYPE*> [#uses=2]
%reg1202 = getelementptr %YYSTYPE* %reg449, long 1 ; <%YYSTYPE*> [#uses=1]
store %YYSTYPE* %reg1202, %YYSTYPE** %yyvsp
%reg452 = load %IntList* getelementptr (%YYSTYPE* %yyval, long 0, ubyte 0) ; <%IntList> [#uses=1]
%reg1202.idx1 = getelementptr %YYSTYPE* %reg449, long 1, ubyte 0 ; <%IntList*> [#uses=1]
store %IntList %reg452, %IntList* %reg1202.idx1
br label %bb4
bb113: ; preds = %bb111, %bb30, %bb13, %bb2
call void %yyerror( sbyte* getelementptr ([20 x sbyte]* %.LC1, long 0, long 0) )
br label %UnifiedExitNode
UnifiedExitNode: ; preds = %bb113, %bb102, %bb34, %bb32
%UnifiedRetVal = phi int [ 1, %bb113 ], [ 1, %bb34 ], [ 1, %bb32 ], [ 0, %bb102 ] ; <int> [#uses=1]
ret int %UnifiedRetVal
}
declare %List %newList(sbyte*, %List)
declare %IntList %newIntList(int, %IntList)
declare void %doStart(sbyte*)
declare void %yyerror(sbyte*)
declare void %doSpec(%List, %List)
declare %Arity %newArity(int, %List)
declare %Binding %newBinding(sbyte*, int)
declare %PatternAST %newPatternAST(sbyte*, %List)
declare %RuleAST %newRuleAST(sbyte*, %PatternAST, int, %IntList)
declare void %yyfinished()
declare int %yylex()
declare void %doGram(%List)
declare int %yygrowstack()

View File

@ -1,32 +0,0 @@
; RUN: llvm-as -f %s -o - | llc
; This caused a problem because the argument of a call was defined by
; the return value of another call that appears later in the code.
; When processing the first call, the second call has not yet been processed
; so no LiveRange has been created for its return value.
;
; llc dies in UltraSparcRegInfo::suggestRegs4CallArgs() with:
; ERROR: In call instr, no LR for arg: 0x1009e0740
;
implementation ; Functions:
declare int %getInt(int);
int %main(int %argc, sbyte** %argv) {
bb0: ;[#uses=0]
br label %bb2
bb1:
%reg222 = call int (int)* %getInt(int %reg218) ;; ARG #1 HAS NO LR
%reg110 = add int %reg222, 1
%b = setle int %reg110, 0
br bool %b, label %bb2, label %bb3
bb2:
%reg218 = call int (int)* %getInt(int %argc) ;; THIS CALL NOT YET SEEN
br label %bb1
bb3:
ret int %reg110
}

View File

@ -1,29 +0,0 @@
; RUN: llvm-as -f %s -o - | llc
;; GetMemInstArgs() folded the two getElementPtr instructions together,
;; producing an illegal getElementPtr. That's because the type generated
;; by the last index for the first one is a structure field, not an array
;; element, and the second one indexes off that structure field.
;; The code is legal but not type-safe and the two GEPs should not be folded.
;;
;; This code fragment is from Spec/CINT2000/197.parser/197.parser.bc,
;; file post_process.c, function build_domain().
;; (Modified to replace store with load and return load value.)
;;
%Domain = type { sbyte*, int, int*, int, int, int*, %Domain* }
%domain_array = uninitialized global [497 x %Domain]
implementation; Functions:
declare void %opaque([497 x %Domain]*)
int %main(int %argc, sbyte** %argv) {
bb0: ;[#uses=0]
call void %opaque([497 x %Domain]* %domain_array)
%cann-indvar-idxcast = cast int %argc to long
%reg841 = getelementptr [497 x %Domain]* %domain_array, long 0, long %cann-indvar-idxcast, ubyte 3
%reg846 = getelementptr int* %reg841, long 1
%reg820 = load int* %reg846
ret int %reg820
}

View File

@ -1,43 +0,0 @@
; RUN: llvm-as -f %s -o - | llc
; On this code, llc did not pass the sixth argument (%reg321) to printf.
; It passed the first five in %o0 - %o4, but never initialized %o5.
; Fix in SparcInstrSelection.cpp:
; 2030c2030
; - if (i < target.getRegInfo().GetNumOfIntArgRegs())
; + if (i <= target.getRegInfo().GetNumOfIntArgRegs())
;
%.LC12 = internal global [44 x sbyte] c"\09\09M = %g, I = %g, V = %g\0A\09\09O = %g, E = %g\0A\0A\00" ; <[44 x sbyte]*>
implementation;
declare int %printf(sbyte*, ...)
declare double %opaque(double)
int %main(int %argc, sbyte** %argv) {
bb25:
%b = setle int %argc, 2
br bool %b, label %bb42, label %bb43
bb42:
%reg315 = call double (double)* %opaque(double 3.0)
%reg316 = call double (double)* %opaque(double 3.1)
%reg317 = call double (double)* %opaque(double 3.2)
%reg318 = call double (double)* %opaque(double 3.3)
%reg319 = call double (double)* %opaque(double 3.4)
br label %bb43
bb43:
%reg321 = phi double [ 2.000000e-01, %bb25 ], [ %reg315, %bb42 ]
%reg322 = phi double [ 6.000000e+00, %bb25 ], [ %reg316, %bb42 ]
%reg323 = phi double [ 0xBFF0000000000000, %bb25 ], [ %reg317, %bb42 ]
%reg324 = phi double [ 0xBFF0000000000000, %bb25 ], [ %reg318, %bb42 ]
%reg325 = phi double [ 1.000000e+00, %bb25 ], [ %reg319, %bb42 ]
%reg609 = call int (sbyte*, ...)* %printf( sbyte* getelementptr ([44 x sbyte]* %.LC12, long 0, long 0), double %reg325, double %reg324, double %reg323, double %reg322, double %reg321 )
ret int 0
}

View File

@ -1,30 +0,0 @@
; RUN: llvm-as -f %s -o - | llc
implementation
int "main"()
begin
bb0:
%reg109 = malloc int, uint 100
br label %bb2
bb2:
%cann-indvar1 = phi int [ 0, %bb0 ], [ %add1-indvar1, %bb2 ]
%reg127 = mul int %cann-indvar1, 2
%add1-indvar1 = add int %cann-indvar1, 1
store int 999, int * %reg109
%cond1015 = setle int 1, 99
%reg128 = add int %reg127, 2
br bool %cond1015, label %bb2, label %bb4
bb4: ;[#uses=3]
%cann-indvar = phi uint [ %add1-indvar, %bb4 ], [ 0, %bb2 ]
%add1-indvar = add uint %cann-indvar, 1 ; <uint> [#uses=1]
store int 333, int * %reg109
%reg131 = add uint %add1-indvar, 3 ; <int> [#uses=1]
%cond1017 = setle uint %reg131, 99 ; <bool> [#uses=1]
br bool %cond1017, label %bb4, label %bb5
bb5:
ret int 0
end

View File

@ -1,56 +0,0 @@
; RUN: llvm-as -f %s -o - | llc
; Test that a sequence of constant indices are folded correctly
; into the equivalent offset at compile-time.
%MixedA = type { float, [15 x int], sbyte, float }
%MixedB = type { float, %MixedA, float }
%fmtArg = internal global [44 x sbyte] c"sqrt(2) = %g\0Aexp(1) = %g\0Api = %g\0Afive = %g\0A\00"; <[44 x sbyte]*> [#uses=1]
implementation
declare int "printf"(sbyte*, ...)
int "main"()
begin
%ScalarA = alloca %MixedA
%ScalarB = alloca %MixedB
%ArrayA = alloca %MixedA, uint 4
%ArrayB = alloca %MixedB, uint 3
%I1 = getelementptr %MixedA* %ScalarA, long 0, ubyte 0
store float 1.4142, float *%I1
%I2 = getelementptr %MixedB* %ScalarB, long 0, ubyte 1, ubyte 0
store float 2.7183, float *%I2
%fptrA = getelementptr %MixedA* %ArrayA, long 1, ubyte 0
%fptrB = getelementptr %MixedB* %ArrayB, long 2, ubyte 1, ubyte 0
store float 3.1415, float* %fptrA
store float 5.0, float* %fptrB
;; Test that a sequence of GEPs with constant indices are folded right
%fptrA1 = getelementptr %MixedA* %ArrayA, long 3 ; &ArrayA[3]
%fptrA2 = getelementptr %MixedA* %fptrA1, long 0, ubyte 1 ; &(*fptrA1).1
%fptrA3 = getelementptr [15 x int]* %fptrA2, long 0, long 8 ; &(*fptrA2)[8]
store int 5, int* %fptrA3 ; ArrayA[3].1[8] = 5
%sqrtTwo = load float *%I1
%exp = load float *%I2
%I3 = getelementptr %MixedA* %ArrayA, long 1, ubyte 0
%pi = load float* %I3
%I4 = getelementptr %MixedB* %ArrayB, long 2, ubyte 1, ubyte 0
%five = load float* %I4
%dsqrtTwo = cast float %sqrtTwo to double
%dexp = cast float %exp to double
%dpi = cast float %pi to double
%dfive = cast float %five to double
%castFmt = getelementptr [44 x sbyte]* %fmtArg, long 0, long 0
call int (sbyte*, ...)* %printf(sbyte* %castFmt, double %dsqrtTwo, double %dexp, double %dpi, double %dfive)
ret int 0
end

View File

@ -1,35 +0,0 @@
; RUN: llvm-as -f %s -o - | llc
;;
;; Test the sequence:
;; cast -> setle 0, %cast -> br %cond
;; This sequence should cause the cast value to be forwarded twice,
;; i.e., cast is forwarded to the setle and teh setle is forwarded
;; to the branch.
;; register argument of the "branch-on-register" instruction, i.e.,
;;
;; This produces the bogus output instruction:
;; brlez <NULL VALUE>, .L_SumArray_bb3.
;; This came from %bb1 of sumarrray.ll generated from sumarray.c.
;;;; ******************************************************
implementation
;;;; ******************************************************
int "SumArray"(int %Num)
begin
bb0: ;[#uses=3]
br label %Top
Top:
%Num = alloca int ; <int *> [#uses=2]
store int %Num, int * %Num
%reg108 = load int * %Num ; <int> [#uses=2]
%cast1006 = cast int %reg108 to uint ; <uint> [#uses=1]
%cond1001 = setle uint %cast1006, 0 ; <bool> [#uses=1]
br bool %cond1001, label %bb6, label %Top
bb6:
ret int 42
end

View File

@ -1,51 +0,0 @@
; RUN: llvm-as -f %s -o - | llc
; Test that a negative constant smaller than 64 bits (e.g., int)
; is correctly implemented with sign-extension.
; In particular, the current code generated is:
;
; main:
; .L_main_LL_0:
; save %o6, -224, %o6
; setx .G_fmtArg_1, %o1, %o0
; setuw 1, %o1 ! i = 1
; setuw 4294967295, %o3 ! THE BUG: 0x00000000ffffffff
; setsw 0, %i0
; add %i6, 1999, %o2 ! fval
; add %o1, %g0, %o1
; add %o0, 0, %o0
; mulx %o1, %o3, %o1 ! ERROR: 0xffffffff; should be -1
; add %o1, 3, %o1 ! ERROR: 0x100000002; should be 0x2
; mulx %o1, 12, %o3 !
; add %o2, %o3, %o3 ! produces bad address!
; call printf
; nop
; jmpl %i7+8, %g0
; restore %g0, 0, %g0
;
; llc produces:
; ioff = 2 fval = 0xffffffff7fffec90 &fval[2] = 0xb7fffeca8
; instead of:
; ioff = 2 fval = 0xffffffff7fffec90 &fval[2] = 0xffffffff7fffeca8
;
%Results = type { float, float, float }
%fmtArg = internal global [39 x sbyte] c"ioff = %u\09fval = 0x%p\09&fval[2] = 0x%p\0A\00"; <[39 x sbyte]*> [#uses=1]
implementation
declare int "printf"(sbyte*, ...)
int "main"()
begin
%fval = alloca %Results, uint 4
%i = add uint 1, 0 ; i = 1
%iscale = mul uint %i, 4294967295 ; i*-1 = -1
%ioff = add uint %iscale, 3 ; 3+(-i) = 2
%ioff = cast uint %ioff to long
%fptr = getelementptr %Results* %fval, long %ioff ; &fval[2]
%castFmt = getelementptr [39 x sbyte]* %fmtArg, long 0, long 0
call int (sbyte*, ...)* %printf(sbyte* %castFmt, uint %ioff, %Results* %fval, %Results* %fptr)
ret int 0
end

View File

@ -1,33 +0,0 @@
; RUN: llvm-as -f %s -o - | llc
implementation
declare int "printf"(sbyte*, int, float)
int "testissue"(int %i, float %x, float %y)
begin
br label %bb1
bb1:
%x1 = mul float %x, %y ;; x1
%y1 = mul float %y, 0.75 ;; y1
%z1 = add float %x1, %y1 ;; z1 = x1 + y1
%x2 = mul float %x, 0.5 ;; x2
%y2 = mul float %y, 0.9 ;; y2
%z2 = add float %x2, %y2 ;; z2 = x2 + y2
%z3 = add float %z1, %z2 ;; z3 = z1 + z2
%i1 = shl int %i, ubyte 3 ;; i1
%j1 = add int %i, 7 ;; j1
%m1 = add int %i1, %j1 ;; k1 = i1 + j1
;; %m1 = div int %k1, 99 ;; m1 = k1 / 99
%b = setle int %m1, 6 ;; (m1 <= 6)?
br bool %b, label %bb1, label %bb2
bb2:
%Msg = cast ulong 0 to sbyte *
call int %printf(sbyte* %Msg, int %m1, float %z3)
ret int 0
end

View File

@ -1,209 +0,0 @@
; RUN: llvm-as -f %s -o - | llc
%AConst = constant int 123
%Domain = type { sbyte*, int, int*, int, int, int*, %Domain* }
implementation
; Test setting values of different constants in registers.
;
void "testConsts"(int %N, float %X)
begin
; <label>:0
%a = add int %N, 1 ; 1 should be put in immed field
%i = add int %N, 12345678 ; constant has to be loaded
%b = add short 4, 3 ; one of the operands shd be immed
%c = add float %X, 0.0 ; will this be optimzzed?
%d = add float %X, 3.1415 ; constant has to be loaded
%f = add uint 4294967295, 10 ; result shd be 9 (not in immed fld)
%g = add ushort 20, 65535 ; result shd be 19 (65536 in immed fld)
%j = add ushort 65535, 30 ; result shd be 29 (not in immed fld)
%h = add ubyte 40, 255 ; result shd be 39 (255 in immed fld)
%k = add ubyte 255, 50 ; result shd be 49 (not in immed fld)
ret void
end
; A SetCC whose result is used should produce instructions to
; compute the boolean value in a register. One whose result
; is unused will only generate the condition code but not
; the boolean result.
;
void "unusedBool"(int * %x, int * %y)
begin
; <label>:0 ; [#uses=0]
seteq int * %x, %y ; <bool>:0 [#uses=1]
xor bool %0, true ; <bool>:1 [#uses=0]
setne int * %x, %y ; <bool>:2 [#uses=0]
ret void
end
; A constant argument to a Phi produces a Cast instruction in the
; corresponding predecessor basic block. This checks a few things:
; -- phi arguments coming from the bottom of the same basic block
; (they should not be forward substituted in the machine code!)
; -- code generation for casts of various types
; -- use of immediate fields for integral constants of different sizes
; -- branch on a constant condition
;
void "mergeConstants"(int * %x, int * %y)
begin
; <label>:0
br label %Top
Top:
phi int [ 0, %0 ], [ 1, %Top ], [ 524288, %Next ]
phi float [ 0.0, %0 ], [ 1.0, %Top ], [ 2.0, %Next ]
phi double [ 0.5, %0 ], [ 1.5, %Top ], [ 2.5, %Next ]
phi bool [ true, %0 ], [ false,%Top ], [ true, %Next ]
br bool true, label %Top, label %Next
Next:
br label %Top
end
; A constant argument to a cast used only once should be forward substituted
; and loaded where needed, which happens is:
; -- User of cast has no immediate field
; -- User of cast has immediate field but constant is too large to fit
; or constant is not resolved until later (e.g., global address)
; -- User of cast uses it as a call arg. or return value so it is an implicit
; use but has to be loaded into a virtual register so that the reg.
; allocator can allocate the appropriate phys. reg. for it
;
int* "castconst"(float)
begin
; <label>:0
%castbig = cast ulong 99999999 to int
%castsmall = cast ulong 1 to int
%usebig = add int %castbig, %castsmall
%castglob = cast int* %AConst to long*
%dummyl = load long* %castglob
%castnull = cast ulong 0 to int*
ret int* %castnull
end
; Test branch-on-comparison-with-zero, in two ways:
; 1. can be folded
; 2. cannot be folded because result of comparison is used twice
;
void "testbool"(int %A, int %B) {
br label %Top
Top:
%D = add int %A, %B
%E = sub int %D, -4
%C = setle int %E, 0
br bool %C, label %retlbl, label %loop
loop:
%F = add int %A, %B
%G = sub int %D, -4
%D = setle int %G, 0
%E = xor bool %D, true
br bool %E, label %loop, label %Top
retlbl:
ret void
end
;; Test use of a boolean result in cast operations.
;; Requires converting a condition code result into a 0/1 value in a reg.
;;
implementation
int %castbool(int %A, int %B) {
bb0: ; [#uses=0]
%cond213 = setlt int %A, %B ; <bool> [#uses=1]
%cast110 = cast bool %cond213 to ubyte ; <ubyte> [#uses=1]
%cast109 = cast ubyte %cast110 to int ; <int> [#uses=1]
ret int %cast109
}
;; Test use of a boolean result in arithmetic and logical operations.
;; Requires converting a condition code result into a 0/1 value in a reg.
;;
bool %boolexpr(bool %b, int %N) {
%b2 = setge int %N, 0
%b3 = and bool %b, %b2
ret bool %b3
}
; Test branch on floating point comparison
;
void "testfloatbool"(float %x, float %y) ; Def %0, %1 - float
begin
; <label>:0
br label %Top
Top:
%p = add float %x, %y ; Def 2 - float
%z = sub float %x, %y ; Def 3 - float
%b = setle float %p, %z ; Def 0 - bool
%c = xor bool %b, true ; Def 1 - bool
br bool %b, label %Top, label %goon
goon:
ret void
end
; Test cases where an LLVM instruction requires no machine
; instructions (e.g., cast int* to long). But there are 2 cases:
; 1. If the result register has only a single use and the use is in the
; same basic block, the operand will be copy-propagated during
; instruction selection.
; 2. If the result register has multiple uses or is in a different
; basic block, it cannot (or will not) be copy propagated during
; instruction selection. It will generate a
; copy instruction (add-with-0), but this copy should get coalesced
; away by the register allocator.
;
int "checkForward"(int %N, int* %A)
begin
bb2: ;;<label>
%reg114 = shl int %N, ubyte 2 ;;
%cast115 = cast int %reg114 to long ;; reg114 will be propagated
%cast116 = cast int* %A to long ;; %A will be propagated
%reg116 = add long %cast116, %cast115 ;;
%castPtr = cast long %reg116 to int* ;; %A will be propagated
%reg118 = load int* %castPtr ;;
%cast117 = cast int %reg118 to long ;; reg118 will be copied 'cos
%reg159 = add long 1234567, %cast117 ;; cast117 has 2 uses, here
%reg160 = add long 7654321, %cast117 ;; and here.
ret int 0
end
; Test case for unary NOT operation constructed from XOR.
;
void "checkNot"(bool %b, int %i)
begin
%notB = xor bool %b, true
%notI = xor int %i, -1
%F = setge int %notI, 100
%J = add int %i, %i
%andNotB = and bool %F, %notB ;; should get folded with notB
%andNotI = and int %J, %notI ;; should get folded with notI
%notB2 = xor bool true, %b ;; should become XNOR
%notI2 = xor int -1, %i ;; should become XNOR
ret void
end
; Test case for folding getelementptr into a load/store
;
int "checkFoldGEP"(%Domain* %D, long %idx)
begin
%reg841 = getelementptr %Domain* %D, long 0, ubyte 1
%reg820 = load int* %reg841
ret int %reg820
end

View File

@ -1,50 +0,0 @@
; RUN: llvm-as -f %s -o - | llc
; July 6, 2002 -- LLC Regression test
; This test case checks if the integer CC register %xcc (or %ccr)
; is correctly spilled. The code fragment came from function
; MakeGraph in Olden-mst.
; The original code made all comparisons with 0, so that the %xcc
; register is not needed for the branch in the first basic block.
; Replace 0 with 1 in the first comparson so that the
; branch-on-register instruction cannot be used directly, i.e.,
; the %xcc register is needed for the first branch.
;
%Graph = type %struct.graph_st*
%Hash = type %struct.hash*
%HashEntry = type %struct.hash_entry*
%Vertex = type %struct.vert_st*
%struct.graph_st = type { [1 x %Vertex] }
%struct.hash = type { %HashEntry*, int (uint)*, int }
%struct.hash_entry = type { uint, sbyte*, %HashEntry }
%struct.vert_st = type { int, %Vertex, %Hash }
%HashRange = uninitialized global int ; <int*> [#uses=1]
%.LC0 = internal global [13 x sbyte] c"Make phase 2\00" ; <[13 x sbyte]*> [#uses=1]
%.LC1 = internal global [13 x sbyte] c"Make phase 3\00" ; <[13 x sbyte]*> [#uses=1]
%.LC2 = internal global [13 x sbyte] c"Make phase 4\00" ; <[13 x sbyte]*> [#uses=1]
%.LC3 = internal global [15 x sbyte] c"Make returning\00" ; <[15 x sbyte]*> [#uses=1]
implementation ; Functions:
%Graph %MakeGraph(int %numvert, int %numproc) {
bb1: ;[#uses=1]
%reg111 = add int %numproc, -1 ; <int> [#uses=3]
%cond275 = setlt int %reg111, 1 ; <bool> [#uses=2]
%cond276 = setle int %reg111, 0 ; <bool> [#uses=1]
%cond277 = setge int %numvert, 0 ; <bool> [#uses=2]
%reg162 = add int %numvert, 3 ; <int> [#uses=2]
br bool %cond275, label %bb7, label %bb4
bb4:
br bool %cond276, label %bb7, label %bb5
bb5:
br bool %cond277, label %bb7, label %bb6
bb6: ;[#uses=2]
ret %Graph null
bb7: ;[#uses=2]
ret %Graph null
}