Imported Upstream version 5.18.0.179

Former-commit-id: 67aa10e65b237e1c4537630979ee99ebe1374215
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2018-10-25 08:34:57 +00:00
parent d6bde52373
commit 8625704ad8
28485 changed files with 3866843 additions and 50 deletions

View File

@@ -0,0 +1,13 @@
; RUN: llc < %s
; This caused the backend to assert out with:
; SparcInstrInfo.cpp:103: failed assertion `0 && "Unexpected unsigned type"'
;
declare void @bar(i8*)
define void @foo() {
%cast225 = inttoptr i64 123456 to i8* ; <i8*> [#uses=1]
call void @bar( i8* %cast225 )
ret void
}

View File

@@ -0,0 +1,14 @@
; RUN: llc < %s
; Compiling this file produces:
; Sparc.cpp:91: failed assertion `(offset - OFFSET) % getStackFrameSizeAlignment() == 0'
;
declare i32 @SIM(i8*, i8*, i32, i32, i32, [256 x i32]*, i32, i32, i32)
define void @foo() {
bb0:
%V = alloca [256 x i32], i32 256 ; <[256 x i32]*> [#uses=1]
call i32 @SIM( i8* null, i8* null, i32 0, i32 0, i32 0, [256 x i32]* %V, i32 0, i32 0, i32 2 ) ; <i32>:0 [#uses=0]
ret void
}

View File

@@ -0,0 +1,19 @@
; RUN: llc < %s
define void @QRiterate(i32 %p.1, double %tmp.212) {
entry:
%tmp.184 = icmp sgt i32 %p.1, 0 ; <i1> [#uses=1]
br i1 %tmp.184, label %shortcirc_next.1, label %shortcirc_done.1
shortcirc_next.1: ; preds = %shortcirc_done.1, %entry
%tmp.213 = fcmp une double %tmp.212, 0.000000e+00 ; <i1> [#uses=1]
br label %shortcirc_done.1
shortcirc_done.1: ; preds = %shortcirc_next.1, %entry
%val.1 = phi i1 [ false, %entry ], [ %tmp.213, %shortcirc_next.1 ] ; <i1> [#uses=1]
br i1 %val.1, label %shortcirc_next.1, label %exit.1
exit.1: ; preds = %shortcirc_done.1
ret void
}

View File

@@ -0,0 +1,13 @@
; RUN: llc < %s
define void @QRiterate(double %tmp.212) {
%tmp.213 = fcmp une double %tmp.212, 0.000000e+00 ; <i1> [#uses=1]
br label %shortcirc_next.1
shortcirc_next.1: ; preds = %shortcirc_next.1, %0
br i1 %tmp.213, label %shortcirc_next.1, label %exit.1
exit.1: ; preds = %shortcirc_next.1
ret void
}

View File

@@ -0,0 +1,14 @@
; RUN: llc < %s
define void @QRiterate(double %tmp.212) {
entry:
br label %shortcirc_next.1
shortcirc_next.1: ; preds = %shortcirc_next.1, %entry
%tmp.213 = fcmp une double %tmp.212, 0.000000e+00 ; <i1> [#uses=1]
br i1 %tmp.213, label %shortcirc_next.1, label %exit.1
exit.1: ; preds = %shortcirc_next.1
ret void
}

View File

@@ -0,0 +1,153 @@
; RUN: llc < %s
;; 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.
;;
%struct..s_annealing_sched = type { i32, float, float, float, float }
%struct..s_chan = type { i32, float, float, float, float }
%struct..s_det_routing_arch = type { i32, float, float, float, i32, i32, i16, i16, i16, float, float }
%struct..s_placer_opts = type { i32, float, i32, i32, i8*, i32, i32 }
%struct..s_router_opts = type { float, float, float, float, float, i32, i32, i32, i32 }
%struct..s_segment_inf = type { float, i32, i16, i16, float, float, i32, float, float }
%struct..s_switch_inf = type { i32, float, float, float, float }
define i32 @main(i32 %argc.1, i8** %argv.1) {
entry:
%net_file = alloca [300 x i8] ; <[300 x i8]*> [#uses=1]
%place_file = alloca [300 x i8] ; <[300 x i8]*> [#uses=1]
%arch_file = alloca [300 x i8] ; <[300 x i8]*> [#uses=1]
%route_file = alloca [300 x i8] ; <[300 x i8]*> [#uses=1]
%full_stats = alloca i32 ; <i32*> [#uses=1]
%operation = alloca i32 ; <i32*> [#uses=1]
%verify_binary_search = alloca i32 ; <i32*> [#uses=1]
%show_graphics = alloca i32 ; <i32*> [#uses=1]
%annealing_sched = alloca %struct..s_annealing_sched ; <%struct..s_annealing_sched*> [#uses=5]
%placer_opts = alloca %struct..s_placer_opts ; <%struct..s_placer_opts*> [#uses=7]
%router_opts = alloca %struct..s_router_opts ; <%struct..s_router_opts*> [#uses=9]
%det_routing_arch = alloca %struct..s_det_routing_arch ; <%struct..s_det_routing_arch*> [#uses=11]
%segment_inf = alloca %struct..s_segment_inf* ; <%struct..s_segment_inf**> [#uses=1]
%timing_inf = alloca { i32, float, float, float, float, float, float, float, float, float, float } ; <{ i32, float, float, float, float, float, float, float, float, float, float }*> [#uses=11]
%tmp.101 = getelementptr %struct..s_placer_opts, %struct..s_placer_opts* %placer_opts, i64 0, i32 4 ; <i8**> [#uses=1]
%tmp.105 = getelementptr [300 x i8], [300 x i8]* %net_file, i64 0, i64 0 ; <i8*> [#uses=1]
%tmp.106 = getelementptr [300 x i8], [300 x i8]* %arch_file, i64 0, i64 0 ; <i8*> [#uses=1]
%tmp.107 = getelementptr [300 x i8], [300 x i8]* %place_file, i64 0, i64 0 ; <i8*> [#uses=1]
%tmp.108 = getelementptr [300 x i8], [300 x i8]* %route_file, i64 0, i64 0 ; <i8*> [#uses=1]
%tmp.109 = getelementptr { i32, float, float, float, float, float, float, float, float, float, float }, { i32, float, float, float, float, float, float, float, float, float, float }* %timing_inf, i64 0, i32 0 ; <i32*> [#uses=1]
%tmp.112 = getelementptr %struct..s_placer_opts, %struct..s_placer_opts* %placer_opts, i64 0, i32 0 ; <i32*> [#uses=1]
%tmp.114 = getelementptr %struct..s_placer_opts, %struct..s_placer_opts* %placer_opts, i64 0, i32 6 ; <i32*> [#uses=1]
%tmp.118 = getelementptr %struct..s_router_opts, %struct..s_router_opts* %router_opts, i64 0, i32 7 ; <i32*> [#uses=1]
%tmp.135 = load i32, i32* %operation ; <i32> [#uses=1]
%tmp.137 = load i32, i32* %tmp.112 ; <i32> [#uses=1]
%tmp.138 = getelementptr %struct..s_placer_opts, %struct..s_placer_opts* %placer_opts, i64 0, i32 1 ; <float*> [#uses=1]
%tmp.139 = load float, float* %tmp.138 ; <float> [#uses=1]
%tmp.140 = getelementptr %struct..s_placer_opts, %struct..s_placer_opts* %placer_opts, i64 0, i32 2 ; <i32*> [#uses=1]
%tmp.141 = load i32, i32* %tmp.140 ; <i32> [#uses=1]
%tmp.142 = getelementptr %struct..s_placer_opts, %struct..s_placer_opts* %placer_opts, i64 0, i32 3 ; <i32*> [#uses=1]
%tmp.143 = load i32, i32* %tmp.142 ; <i32> [#uses=1]
%tmp.145 = load i8*, i8** %tmp.101 ; <i8*> [#uses=1]
%tmp.146 = getelementptr %struct..s_placer_opts, %struct..s_placer_opts* %placer_opts, i64 0, i32 5 ; <i32*> [#uses=1]
%tmp.147 = load i32, i32* %tmp.146 ; <i32> [#uses=1]
%tmp.149 = load i32, i32* %tmp.114 ; <i32> [#uses=1]
%tmp.154 = load i32, i32* %full_stats ; <i32> [#uses=1]
%tmp.155 = load i32, i32* %verify_binary_search ; <i32> [#uses=1]
%tmp.156 = getelementptr %struct..s_annealing_sched, %struct..s_annealing_sched* %annealing_sched, i64 0, i32 0 ; <i32*> [#uses=1]
%tmp.157 = load i32, i32* %tmp.156 ; <i32> [#uses=1]
%tmp.158 = getelementptr %struct..s_annealing_sched, %struct..s_annealing_sched* %annealing_sched, i64 0, i32 1 ; <float*> [#uses=1]
%tmp.159 = load float, float* %tmp.158 ; <float> [#uses=1]
%tmp.160 = getelementptr %struct..s_annealing_sched, %struct..s_annealing_sched* %annealing_sched, i64 0, i32 2 ; <float*> [#uses=1]
%tmp.161 = load float, float* %tmp.160 ; <float> [#uses=1]
%tmp.162 = getelementptr %struct..s_annealing_sched, %struct..s_annealing_sched* %annealing_sched, i64 0, i32 3 ; <float*> [#uses=1]
%tmp.163 = load float, float* %tmp.162 ; <float> [#uses=1]
%tmp.164 = getelementptr %struct..s_annealing_sched, %struct..s_annealing_sched* %annealing_sched, i64 0, i32 4 ; <float*> [#uses=1]
%tmp.165 = load float, float* %tmp.164 ; <float> [#uses=1]
%tmp.166 = getelementptr %struct..s_router_opts, %struct..s_router_opts* %router_opts, i64 0, i32 0 ; <float*> [#uses=1]
%tmp.167 = load float, float* %tmp.166 ; <float> [#uses=1]
%tmp.168 = getelementptr %struct..s_router_opts, %struct..s_router_opts* %router_opts, i64 0, i32 1 ; <float*> [#uses=1]
%tmp.169 = load float, float* %tmp.168 ; <float> [#uses=1]
%tmp.170 = getelementptr %struct..s_router_opts, %struct..s_router_opts* %router_opts, i64 0, i32 2 ; <float*> [#uses=1]
%tmp.171 = load float, float* %tmp.170 ; <float> [#uses=1]
%tmp.172 = getelementptr %struct..s_router_opts, %struct..s_router_opts* %router_opts, i64 0, i32 3 ; <float*> [#uses=1]
%tmp.173 = load float, float* %tmp.172 ; <float> [#uses=1]
%tmp.174 = getelementptr %struct..s_router_opts, %struct..s_router_opts* %router_opts, i64 0, i32 4 ; <float*> [#uses=1]
%tmp.175 = load float, float* %tmp.174 ; <float> [#uses=1]
%tmp.176 = getelementptr %struct..s_router_opts, %struct..s_router_opts* %router_opts, i64 0, i32 5 ; <i32*> [#uses=1]
%tmp.177 = load i32, i32* %tmp.176 ; <i32> [#uses=1]
%tmp.178 = getelementptr %struct..s_router_opts, %struct..s_router_opts* %router_opts, i64 0, i32 6 ; <i32*> [#uses=1]
%tmp.179 = load i32, i32* %tmp.178 ; <i32> [#uses=1]
%tmp.181 = load i32, i32* %tmp.118 ; <i32> [#uses=1]
%tmp.182 = getelementptr %struct..s_router_opts, %struct..s_router_opts* %router_opts, i64 0, i32 8 ; <i32*> [#uses=1]
%tmp.183 = load i32, i32* %tmp.182 ; <i32> [#uses=1]
%tmp.184 = getelementptr %struct..s_det_routing_arch, %struct..s_det_routing_arch* %det_routing_arch, i64 0, i32 0 ; <i32*> [#uses=1]
%tmp.185 = load i32, i32* %tmp.184 ; <i32> [#uses=1]
%tmp.186 = getelementptr %struct..s_det_routing_arch, %struct..s_det_routing_arch* %det_routing_arch, i64 0, i32 1 ; <float*> [#uses=1]
%tmp.187 = load float, float* %tmp.186 ; <float> [#uses=1]
%tmp.188 = getelementptr %struct..s_det_routing_arch, %struct..s_det_routing_arch* %det_routing_arch, i64 0, i32 2 ; <float*> [#uses=1]
%tmp.189 = load float, float* %tmp.188 ; <float> [#uses=1]
%tmp.190 = getelementptr %struct..s_det_routing_arch, %struct..s_det_routing_arch* %det_routing_arch, i64 0, i32 3 ; <float*> [#uses=1]
%tmp.191 = load float, float* %tmp.190 ; <float> [#uses=1]
%tmp.192 = getelementptr %struct..s_det_routing_arch, %struct..s_det_routing_arch* %det_routing_arch, i64 0, i32 4 ; <i32*> [#uses=1]
%tmp.193 = load i32, i32* %tmp.192 ; <i32> [#uses=1]
%tmp.194 = getelementptr %struct..s_det_routing_arch, %struct..s_det_routing_arch* %det_routing_arch, i64 0, i32 5 ; <i32*> [#uses=1]
%tmp.195 = load i32, i32* %tmp.194 ; <i32> [#uses=1]
%tmp.196 = getelementptr %struct..s_det_routing_arch, %struct..s_det_routing_arch* %det_routing_arch, i64 0, i32 6 ; <i16*> [#uses=1]
%tmp.197 = load i16, i16* %tmp.196 ; <i16> [#uses=1]
%tmp.198 = getelementptr %struct..s_det_routing_arch, %struct..s_det_routing_arch* %det_routing_arch, i64 0, i32 7 ; <i16*> [#uses=1]
%tmp.199 = load i16, i16* %tmp.198 ; <i16> [#uses=1]
%tmp.200 = getelementptr %struct..s_det_routing_arch, %struct..s_det_routing_arch* %det_routing_arch, i64 0, i32 8 ; <i16*> [#uses=1]
%tmp.201 = load i16, i16* %tmp.200 ; <i16> [#uses=1]
%tmp.202 = getelementptr %struct..s_det_routing_arch, %struct..s_det_routing_arch* %det_routing_arch, i64 0, i32 9 ; <float*> [#uses=1]
%tmp.203 = load float, float* %tmp.202 ; <float> [#uses=1]
%tmp.204 = getelementptr %struct..s_det_routing_arch, %struct..s_det_routing_arch* %det_routing_arch, i64 0, i32 10 ; <float*> [#uses=1]
%tmp.205 = load float, float* %tmp.204 ; <float> [#uses=1]
%tmp.206 = load %struct..s_segment_inf*, %struct..s_segment_inf** %segment_inf ; <%struct..s_segment_inf*> [#uses=1]
%tmp.208 = load i32, i32* %tmp.109 ; <i32> [#uses=1]
%tmp.209 = getelementptr { i32, float, float, float, float, float, float, float, float, float, float }, { i32, float, float, float, float, float, float, float, float, float, float }* %timing_inf, i64 0, i32 1 ; <float*> [#uses=1]
%tmp.210 = load float, float* %tmp.209 ; <float> [#uses=1]
%tmp.211 = getelementptr { i32, float, float, float, float, float, float, float, float, float, float }, { i32, float, float, float, float, float, float, float, float, float, float }* %timing_inf, i64 0, i32 2 ; <float*> [#uses=1]
%tmp.212 = load float, float* %tmp.211 ; <float> [#uses=1]
%tmp.213 = getelementptr { i32, float, float, float, float, float, float, float, float, float, float }, { i32, float, float, float, float, float, float, float, float, float, float }* %timing_inf, i64 0, i32 3 ; <float*> [#uses=1]
%tmp.214 = load float, float* %tmp.213 ; <float> [#uses=1]
%tmp.215 = getelementptr { i32, float, float, float, float, float, float, float, float, float, float }, { i32, float, float, float, float, float, float, float, float, float, float }* %timing_inf, i64 0, i32 4 ; <float*> [#uses=1]
%tmp.216 = load float, float* %tmp.215 ; <float> [#uses=1]
%tmp.217 = getelementptr { i32, float, float, float, float, float, float, float, float, float, float }, { i32, float, float, float, float, float, float, float, float, float, float }* %timing_inf, i64 0, i32 5 ; <float*> [#uses=1]
%tmp.218 = load float, float* %tmp.217 ; <float> [#uses=1]
%tmp.219 = getelementptr { i32, float, float, float, float, float, float, float, float, float, float }, { i32, float, float, float, float, float, float, float, float, float, float }* %timing_inf, i64 0, i32 6 ; <float*> [#uses=1]
%tmp.220 = load float, float* %tmp.219 ; <float> [#uses=1]
%tmp.221 = getelementptr { i32, float, float, float, float, float, float, float, float, float, float }, { i32, float, float, float, float, float, float, float, float, float, float }* %timing_inf, i64 0, i32 7 ; <float*> [#uses=1]
%tmp.222 = load float, float* %tmp.221 ; <float> [#uses=1]
%tmp.223 = getelementptr { i32, float, float, float, float, float, float, float, float, float, float }, { i32, float, float, float, float, float, float, float, float, float, float }* %timing_inf, i64 0, i32 8 ; <float*> [#uses=1]
%tmp.224 = load float, float* %tmp.223 ; <float> [#uses=1]
%tmp.225 = getelementptr { i32, float, float, float, float, float, float, float, float, float, float }, { i32, float, float, float, float, float, float, float, float, float, float }* %timing_inf, i64 0, i32 9 ; <float*> [#uses=1]
%tmp.226 = load float, float* %tmp.225 ; <float> [#uses=1]
%tmp.227 = getelementptr { i32, float, float, float, float, float, float, float, float, float, float }, { i32, float, float, float, float, float, float, float, float, float, float }* %timing_inf, i64 0, i32 10 ; <float*> [#uses=1]
%tmp.228 = load float, float* %tmp.227 ; <float> [#uses=1]
call void @place_and_route( i32 %tmp.135, i32 %tmp.137, float %tmp.139, i32 %tmp.141, i32 %tmp.143, i8* %tmp.145, i32 %tmp.147, i32 %tmp.149, i8* %tmp.107, i8* %tmp.105, i8* %tmp.106, i8* %tmp.108, i32 %tmp.154, i32 %tmp.155, i32 %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, i32 %tmp.177, i32 %tmp.179, i32 %tmp.181, i32 %tmp.183, i32 %tmp.185, float %tmp.187, float %tmp.189, float %tmp.191, i32 %tmp.193, i32 %tmp.195, i16 %tmp.197, i16 %tmp.199, i16 %tmp.201, float %tmp.203, float %tmp.205, %struct..s_segment_inf* %tmp.206, i32 %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 i32, i32* %show_graphics ; <i32> [#uses=1]
%tmp.232 = icmp ne i32 %tmp.231, 0 ; <i1> [#uses=1]
br i1 %tmp.232, label %then.2, label %endif.2
then.2: ; preds = %entry
br label %endif.2
endif.2: ; preds = %then.2, %entry
ret i32 0
}
declare i32 @printf(i8*, ...)
declare void @place_and_route(i32, i32, float, i32, i32, i8*, i32, i32, i8*, i8*, i8*, i8*, i32, i32, i32, float, float, float, float, float, float, float, float, float, i32, i32, i32, i32, i32, float, float, float, i32, i32, i16, i16, i16, float, float, %struct..s_segment_inf*, i32, float, float, float, float, float, float, float, float, float, float)

View File

@@ -0,0 +1,39 @@
; RUN: llc < %s
;; 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 { i32, [256 x i8], i32, i32, i32, i32 }
@OutputFiles = external global [16 x %FileType] ; <[16 x %FileType]*> [#uses=1]
@Output = internal global %FileType* null ; <%FileType**> [#uses=1]
define internal i32 @OpenOutput(i8* %filename.1) {
entry:
%tmp.0 = load %FileType*, %FileType** @Output ; <%FileType*> [#uses=1]
%tmp.4 = getelementptr %FileType, %FileType* %tmp.0, i64 1 ; <%FileType*> [#uses=1]
%addrOfGlobal = getelementptr [16 x %FileType], [16 x %FileType]* @OutputFiles, i64 0 ; <[16 x %FileType]*> [#uses=1]
%constantGEP = getelementptr [16 x %FileType], [16 x %FileType]* %addrOfGlobal, i64 1 ; <[16 x %FileType]*> [#uses=1]
%constantGEP.upgrd.1 = getelementptr [16 x %FileType], [16 x %FileType]* %constantGEP, i64 0, i64 0 ; <%FileType*> [#uses=1]
%tmp.10 = icmp eq %FileType* %tmp.4, %constantGEP.upgrd.1 ; <i1> [#uses=1]
br i1 %tmp.10, label %return, label %endif.0
endif.0: ; preds = %entry
ret i32 0
return: ; preds = %entry
ret i32 1
}

View File

@@ -0,0 +1,33 @@
; RUN: llc < %s
;; 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.
%struct..packet = type { %struct..packet*, i32, i32, i32, [4 x i8] }
%struct..task = type { %struct..task*, i32, i32, %struct..packet*, i32, %struct..task* (%struct..packet*)*, i32, i32 }
@v1 = external global i32 ; <i32*> [#uses=1]
@v2 = external global i32 ; <i32*> [#uses=1]
define %struct..task* @handlerfn(%struct..packet* %pkt.2) {
entry:
%tmp.1 = icmp ne %struct..packet* %pkt.2, null ; <i1> [#uses=1]
br i1 %tmp.1, label %cond_false, label %cond_continue
cond_false: ; preds = %entry
br label %cond_continue
cond_continue: ; preds = %cond_false, %entry
%mem_tmp.0 = phi i32* [ @v2, %cond_false ], [ @v1, %entry ] ; <i32*> [#uses=1]
%tmp.12 = bitcast i32* %mem_tmp.0 to %struct..packet* ; <%struct..packet*> [#uses=1]
call void @append( %struct..packet* %pkt.2, %struct..packet* %tmp.12 )
ret %struct..task* null
}
declare void @append(%struct..packet*, %struct..packet*)

View File

@@ -0,0 +1,51 @@
; RUN: llc < %s
;; 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.
@.str_1 = internal constant [6 x i8] c"true\0A\00" ; <[6 x i8]*> [#uses=1]
@.str_2 = internal constant [7 x i8] c"false\0A\00" ; <[7 x i8]*> [#uses=1]
declare i32 @printf(i8*, ...)
define internal void @__main() {
entry:
ret void
}
define internal void @CheckOutside(i32 %x.1, i32 %y.1) {
entry:
%tmp.2 = mul i32 %x.1, %x.1 ; <i32> [#uses=1]
%tmp.5 = mul i32 %y.1, %y.1 ; <i32> [#uses=1]
%tmp.6 = add i32 %tmp.2, %tmp.5 ; <i32> [#uses=1]
%tmp.8 = icmp sle i32 %tmp.6, 4194304 ; <i1> [#uses=1]
br i1 %tmp.8, label %then, label %else
then: ; preds = %entry
%tmp.11 = call i32 (i8*, ...) @printf( i8* getelementptr ([6 x i8], [6 x i8]* @.str_1, i64 0, i64 0) ) ; <i32> [#uses=0]
br label %UnifiedExitNode
else: ; preds = %entry
%tmp.13 = call i32 (i8*, ...) @printf( i8* getelementptr ([7 x i8], [7 x i8]* @.str_2, i64 0, i64 0) ) ; <i32> [#uses=0]
br label %UnifiedExitNode
UnifiedExitNode: ; preds = %else, %then
ret void
}
define i32 @main() {
entry:
call void @__main( )
call void @CheckOutside( i32 2097152, i32 2097152 )
ret i32 0
}

View File

@@ -0,0 +1,20 @@
; RUN: llc < %s
@.str_1 = internal constant [42 x i8] c" ui = %u (0x%x)\09\09UL-ui = %lld (0x%llx)\0A\00" ; <[42 x i8]*> [#uses=1]
declare i32 @printf(i8*, ...)
define internal i64 @getL() {
entry:
ret i64 -5787213826675591005
}
define i32 @main(i32 %argc.1, i8** %argv.1) {
entry:
%tmp.11 = call i64 @getL( ) ; <i64> [#uses=2]
%tmp.5 = trunc i64 %tmp.11 to i32 ; <i32> [#uses=2]
%tmp.23 = and i64 %tmp.11, -4294967296 ; <i64> [#uses=2]
%tmp.16 = call i32 (i8*, ...) @printf( i8* getelementptr ([42 x i8], [42 x i8]* @.str_1, i64 0, i64 0), i32 %tmp.5, i32 %tmp.5, i64 %tmp.23, i64 %tmp.23 ) ; <i32> [#uses=0]
ret i32 0
}

View File

@@ -0,0 +1,34 @@
; RUN: llc < %s
;; 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.
@.str_1 = internal constant [30 x i8] c"d = %d, ct = %d, d ^ ct = %d\0A\00"
declare i32 @printf(i8*, ...)
define i32 @adj(i32 %d.1, i32 %ct.1) {
entry:
%tmp.19 = icmp eq i32 %ct.1, 2 ; <i1> [#uses=1]
%tmp.22.not = trunc i32 %ct.1 to i1 ; <i1> [#uses=1]
%tmp.221 = xor i1 %tmp.22.not, true ; <i1> [#uses=1]
%tmp.26 = or i1 %tmp.19, %tmp.221 ; <i1> [#uses=1]
%tmp.27 = zext i1 %tmp.26 to i32 ; <i32> [#uses=1]
ret i32 %tmp.27
}
define i32 @main() {
entry:
%result = call i32 @adj( i32 3, i32 2 ) ; <i32> [#uses=1]
%tmp.0 = call i32 (i8*, ...) @printf( i8* getelementptr ([30 x i8], [30 x i8]* @.str_1, i64 0, i64 0), i32 3, i32 2, i32 %result ) ; <i32> [#uses=0]
ret i32 0
}

View File

@@ -0,0 +1,42 @@
; RUN: llc < %s
; Bug: PR31341
;; 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:
;; .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 i8] c"\06\07\01\08\01\09" ; <[6 x i8]*> [#uses=1]
@.str_3 = internal constant [8 x i8] c"[%d] = \00" ; <[8 x i8]*> [#uses=1]
@.str_4 = internal constant [4 x i8] c"%d\0A\00" ; <[4 x i8]*> [#uses=1]
declare i32 @printf(i8*, ...)
define i32 @main() {
entry:
br label %loopentry
loopentry: ; preds = %loopentry, %entry
%i = phi i64 [ 0, %entry ], [ %inc.i, %loopentry ] ; <i64> [#uses=3]
%cptr = getelementptr [6 x i8], [6 x i8]* @yy_ec, i64 0, i64 %i ; <i8*> [#uses=1]
%c = load i8, i8* %cptr ; <i8> [#uses=1]
%ignore = call i32 (i8*, ...) @printf( i8* getelementptr ([8 x i8], [8 x i8]* @.str_3, i64 0, i64 0), i64 %i ) ; <i32> [#uses=0]
%ignore2 = call i32 (i8*, ...) @printf( i8* getelementptr ([4 x i8], [4 x i8]* @.str_4, i64 0, i64 0), i8 %c ) ; <i32> [#uses=0]
%inc.i = add i64 %i, 1 ; <i64> [#uses=2]
%done = icmp sle i64 %inc.i, 5 ; <i1> [#uses=1]
br i1 %done, label %loopentry, label %exit.1
exit.1: ; preds = %loopentry
ret i32 0
}

View File

@@ -0,0 +1,13 @@
; RUN: llc < %s
@global_long_1 = linkonce global i64 7 ; <i64*> [#uses=1]
@global_long_2 = linkonce global i64 49 ; <i64*> [#uses=1]
define i32 @main() {
%l1 = load i64, i64* @global_long_1 ; <i64> [#uses=1]
%l2 = load i64, i64* @global_long_2 ; <i64> [#uses=1]
%cond = icmp sle i64 %l1, %l2 ; <i1> [#uses=1]
%cast2 = zext i1 %cond to i32 ; <i32> [#uses=1]
%RV = sub i32 1, %cast2 ; <i32> [#uses=1]
ret i32 %RV
}

View File

@@ -0,0 +1,20 @@
; RUN: llc < %s
define void @intersect_pixel() {
entry:
%tmp125 = fcmp uno double 0.000000e+00, 0.000000e+00 ; <i1> [#uses=1]
%tmp126 = or i1 %tmp125, false ; <i1> [#uses=1]
%tmp126.not = xor i1 %tmp126, true ; <i1> [#uses=1]
%brmerge1 = or i1 %tmp126.not, false ; <i1> [#uses=1]
br i1 %brmerge1, label %bb154, label %cond_false133
cond_false133: ; preds = %entry
ret void
bb154: ; preds = %entry
%tmp164 = icmp eq i32 0, 0 ; <i1> [#uses=0]
ret void
}
declare i1 @llvm.isunordered.f64(double, double)

View File

@@ -0,0 +1,20 @@
; RUN: llc < %s
%struct.TypHeader = type { i32, %struct.TypHeader**, [3 x i8], i8 }
@.str_67 = external global [4 x i8] ; <[4 x i8]*> [#uses=1]
@.str_87 = external global [17 x i8] ; <[17 x i8]*> [#uses=1]
define void @PrBinop() {
entry:
br i1 false, label %cond_true, label %else.0
cond_true: ; preds = %entry
br label %else.0
else.0: ; preds = %cond_true, %entry
%tmp.167.1 = phi i32 [ ptrtoint ([17 x i8]* @.str_87 to i32), %entry ], [ 0, %cond_true ] ; <i32> [#uses=0]
call void @Pr( i8* getelementptr ([4 x i8], [4 x i8]* @.str_67, i32 0, i32 0), i32 0, i32 0 )
ret void
}
declare void @Pr(i8*, i32, i32)

View File

@@ -0,0 +1,6 @@
; RUN: llc < %s
define void @test() {
%X = alloca { } ; <{ }*> [#uses=0]
ret void
}

View File

@@ -0,0 +1,16 @@
; RUN: llc < %s
define float @t(i64 %u_arg) {
%u = bitcast i64 %u_arg to i64 ; <i64> [#uses=1]
%tmp5 = add i64 %u, 9007199254740991 ; <i64> [#uses=1]
%tmp = icmp ugt i64 %tmp5, 18014398509481982 ; <i1> [#uses=1]
br i1 %tmp, label %T, label %F
T: ; preds = %0
ret float 1.000000e+00
F: ; preds = %0
call float @t( i64 0 ) ; <float>:1 [#uses=0]
ret float 0.000000e+00
}

View File

@@ -0,0 +1,20 @@
; RUN: llc < %s
@str = external global [36 x i8] ; <[36 x i8]*> [#uses=0]
@str.upgrd.1 = external global [29 x i8] ; <[29 x i8]*> [#uses=0]
@str1 = external global [29 x i8] ; <[29 x i8]*> [#uses=0]
@str2 = external global [29 x i8] ; <[29 x i8]*> [#uses=1]
@str.upgrd.2 = external global [2 x i8] ; <[2 x i8]*> [#uses=0]
@str3 = external global [2 x i8] ; <[2 x i8]*> [#uses=0]
@str4 = external global [2 x i8] ; <[2 x i8]*> [#uses=0]
@str5 = external global [2 x i8] ; <[2 x i8]*> [#uses=0]
define void @printArgsNoRet(i32 %a1, float %a2, i8 %a3, double %a4, i8* %a5, i32 %a6, float %a7, i8 %a8, double %a9, i8* %a10, i32 %a11, float %a12, i8 %a13, double %a14, i8* %a15) {
entry:
%tmp17 = sext i8 %a13 to i32 ; <i32> [#uses=1]
%tmp23 = call i32 (i8*, ...) @printf( i8* getelementptr ([29 x i8], [29 x i8]* @str2, i32 0, i64 0), i32 %a11, double 0.000000e+00, i32 %tmp17, double %a14, i32 0 ) ; <i32> [#uses=0]
ret void
}
declare i32 @printf(i8*, ...)
declare i32 @main(i32, i8**)

View File

@@ -0,0 +1,7 @@
; RUN: llc < %s
define i64 @test(i64 %A) {
%B = trunc i64 %A to i8 ; <i8> [#uses=1]
%C = sext i8 %B to i64 ; <i64> [#uses=1]
ret i64 %C
}

View File

@@ -0,0 +1,35 @@
; RUN: llc < %s
; ModuleID = '2006-01-12-BadSetCCFold.ll'
%struct.node_t = type { double*, %struct.node_t*, %struct.node_t**, double**, double*, i32, i32 }
define void @main() {
entry:
br i1 false, label %then.2.i, label %endif.2.i
then.2.i: ; preds = %entry
br label %dealwithargs.exit
endif.2.i: ; preds = %entry
br i1 false, label %then.3.i, label %dealwithargs.exit
then.3.i: ; preds = %endif.2.i
br label %dealwithargs.exit
dealwithargs.exit: ; preds = %then.3.i, %endif.2.i, %then.2.i
%n_nodes.4 = phi i32 [ 64, %then.3.i ], [ 64, %then.2.i ], [ 64, %endif.2.i ] ; <i32> [#uses=1]
%tmp.14.i1134.i.i = icmp sgt i32 %n_nodes.4, 1 ; <i1> [#uses=2]
br i1 %tmp.14.i1134.i.i, label %no_exit.i12.i.i, label %fill_table.exit22.i.i
no_exit.i12.i.i: ; preds = %no_exit.i12.i.i, %dealwithargs.exit
br i1 false, label %fill_table.exit22.i.i, label %no_exit.i12.i.i
fill_table.exit22.i.i: ; preds = %no_exit.i12.i.i, %dealwithargs.exit
%cur_node.0.i8.1.i.i = phi %struct.node_t* [ undef, %dealwithargs.exit ], [ null, %no_exit.i12.i.i ] ; <%struct.node_t*> [#uses=0]
br i1 %tmp.14.i1134.i.i, label %no_exit.i.preheader.i.i, label %make_tables.exit.i
no_exit.i.preheader.i.i: ; preds = %fill_table.exit22.i.i
ret void
make_tables.exit.i: ; preds = %fill_table.exit22.i.i
ret void
}

Some files were not shown because too many files have changed in this diff Show More