Imported Upstream version 6.10.0.49

Former-commit-id: 1d6753294b2993e1fbf92de9366bb9544db4189b
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2020-01-16 16:38:04 +00:00
parent d94e79959b
commit 468663ddbb
48518 changed files with 2789335 additions and 61176 deletions

View File

@ -0,0 +1,35 @@
; RUN: llc < %s
target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:32-f32:32:32-f64:32:32-v64:64:64-v128:128:128-a0:0:32"
target triple = "thumbv6t2-elf"
%struct.dwarf_cie = type <{ i32, i32, i8, [0 x i8], [3 x i8] }>
declare i8* @read_sleb128(i8*, i32* nocapture) nounwind
define i32 @get_cie_encoding(%struct.dwarf_cie* %cie) nounwind {
entry:
br i1 undef, label %bb1, label %bb13
bb1: ; preds = %entry
%tmp38 = add i32 undef, 10 ; <i32> [#uses=1]
br label %bb.i
bb.i: ; preds = %bb.i, %bb1
%indvar.i = phi i32 [ 0, %bb1 ], [ %2, %bb.i ] ; <i32> [#uses=3]
%tmp39 = add i32 %indvar.i, %tmp38 ; <i32> [#uses=1]
%p_addr.0.i = getelementptr i8, i8* undef, i32 %tmp39 ; <i8*> [#uses=1]
%0 = load i8, i8* %p_addr.0.i, align 1 ; <i8> [#uses=1]
%1 = icmp slt i8 %0, 0 ; <i1> [#uses=1]
%2 = add i32 %indvar.i, 1 ; <i32> [#uses=1]
br i1 %1, label %bb.i, label %read_uleb128.exit
read_uleb128.exit: ; preds = %bb.i
%.sum40 = add i32 %indvar.i, undef ; <i32> [#uses=1]
%.sum31 = add i32 %.sum40, 2 ; <i32> [#uses=1]
%scevgep.i = getelementptr %struct.dwarf_cie, %struct.dwarf_cie* %cie, i32 0, i32 3, i32 %.sum31 ; <i8*> [#uses=1]
%3 = call i8* @read_sleb128(i8* %scevgep.i, i32* undef) ; <i8*> [#uses=0]
unreachable
bb13: ; preds = %entry
ret i32 0
}

View File

@ -0,0 +1,36 @@
; RUN: llc < %s -mtriple=thumbv7-apple-ios -mattr=+vfp2,+thumb2 | FileCheck %s
; rdar://7076238
@"\01LC" = external constant [36 x i8], align 1 ; <[36 x i8]*> [#uses=1]
define i32 @t(i32, ...) nounwind "no-frame-pointer-elim"="true" {
entry:
; CHECK-LABEL: t:
; CHECK: add r7, sp, #12
%1 = load i8*, i8** undef, align 4 ; <i8*> [#uses=3]
%2 = getelementptr i8, i8* %1, i32 4 ; <i8*> [#uses=1]
%3 = getelementptr i8, i8* %1, i32 8 ; <i8*> [#uses=1]
%4 = bitcast i8* %2 to i32* ; <i32*> [#uses=1]
%5 = load i32, i32* %4, align 4 ; <i32> [#uses=1]
%6 = trunc i32 %5 to i8 ; <i8> [#uses=1]
%7 = getelementptr i8, i8* %1, i32 12 ; <i8*> [#uses=1]
%8 = bitcast i8* %3 to i32* ; <i32*> [#uses=1]
%9 = load i32, i32* %8, align 4 ; <i32> [#uses=1]
%10 = trunc i32 %9 to i16 ; <i16> [#uses=1]
%11 = bitcast i8* %7 to i32* ; <i32*> [#uses=1]
%12 = load i32, i32* %11, align 4 ; <i32> [#uses=1]
%13 = trunc i32 %12 to i16 ; <i16> [#uses=1]
%14 = load i32, i32* undef, align 4 ; <i32> [#uses=2]
%15 = sext i8 %6 to i32 ; <i32> [#uses=2]
%16 = sext i16 %10 to i32 ; <i32> [#uses=2]
%17 = sext i16 %13 to i32 ; <i32> [#uses=2]
%18 = call i32 (i8*, ...) @printf(i8* getelementptr ([36 x i8], [36 x i8]* @"\01LC", i32 0, i32 0), i32 -128, i32 0, i32 %15, i32 %16, i32 %17, i32 0, i32 %14) nounwind ; <i32> [#uses=0]
%19 = add i32 0, %15 ; <i32> [#uses=1]
%20 = add i32 %19, %16 ; <i32> [#uses=1]
%21 = add i32 %20, %14 ; <i32> [#uses=1]
%22 = add i32 %21, %17 ; <i32> [#uses=1]
%23 = add i32 %22, 0 ; <i32> [#uses=1]
ret i32 %23
}
declare i32 @printf(i8* nocapture, ...) nounwind

View File

@ -0,0 +1,22 @@
; RUN: llc < %s -mtriple=thumbv7-apple-darwin9 -mattr=+vfp2,+thumb2
; rdar://7083961
define i32 @value(i64 %b1, i64 %b2) nounwind readonly {
entry:
%0 = icmp eq i32 undef, 0 ; <i1> [#uses=1]
%mod.0.ph.ph = select i1 %0, float -1.000000e+00, float 1.000000e+00 ; <float> [#uses=1]
br label %bb7
bb7: ; preds = %bb7, %entry
br i1 undef, label %bb86.preheader, label %bb7
bb86.preheader: ; preds = %bb7
%1 = fmul float %mod.0.ph.ph, 5.000000e+00 ; <float> [#uses=0]
br label %bb79
bb79: ; preds = %bb79, %bb86.preheader
br i1 undef, label %bb119, label %bb79
bb119: ; preds = %bb79
ret i32 undef
}

View File

@ -0,0 +1,193 @@
; RUN: llc < %s -mtriple=thumbv7-apple-darwin9 -mcpu=cortex-a8 -relocation-model=pic -disable-fp-elim
%struct.FILE = type { i8*, i32, i32, i16, i16, %struct.__sbuf, i32, i8*, i32 (i8*)*, i32 (i8*, i8*, i32)*, i64 (i8*, i64, i32)*, i32 (i8*, i8*, i32)*, %struct.__sbuf, %struct.__sFILEX*, i32, [3 x i8], [1 x i8], %struct.__sbuf, i32, i64 }
%struct.JHUFF_TBL = type { [17 x i8], [256 x i8], i32 }
%struct.JQUANT_TBL = type { [64 x i16], i32 }
%struct.__sFILEX = type opaque
%struct.__sbuf = type { i8*, i32 }
%struct.anon = type { [8 x i32], [48 x i8] }
%struct.backing_store_info = type { void (%struct.jpeg_common_struct*, %struct.backing_store_info*, i8*, i32, i32)*, void (%struct.jpeg_common_struct*, %struct.backing_store_info*, i8*, i32, i32)*, void (%struct.jpeg_common_struct*, %struct.backing_store_info*)*, %struct.FILE*, [64 x i8] }
%struct.jpeg_color_deconverter = type { void (%struct.jpeg_decompress_struct*)*, void (%struct.jpeg_decompress_struct*, i8***, i32, i8**, i32)* }
%struct.jpeg_color_quantizer = type { void (%struct.jpeg_decompress_struct*, i32)*, void (%struct.jpeg_decompress_struct*, i8**, i8**, i32)*, void (%struct.jpeg_decompress_struct*)*, void (%struct.jpeg_decompress_struct*)* }
%struct.jpeg_common_struct = type { %struct.jpeg_error_mgr*, %struct.jpeg_memory_mgr*, %struct.jpeg_progress_mgr*, i32, i32 }
%struct.jpeg_component_info = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, %struct.JQUANT_TBL*, i8* }
%struct.jpeg_d_coef_controller = type { void (%struct.jpeg_decompress_struct*)*, i32 (%struct.jpeg_decompress_struct*)*, void (%struct.jpeg_decompress_struct*)*, i32 (%struct.jpeg_decompress_struct*, i8***)*, %struct.jvirt_barray_control** }
%struct.jpeg_d_main_controller = type { void (%struct.jpeg_decompress_struct*, i32)*, void (%struct.jpeg_decompress_struct*, i8**, i32*, i32)* }
%struct.jpeg_d_post_controller = type { void (%struct.jpeg_decompress_struct*, i32)*, void (%struct.jpeg_decompress_struct*, i8***, i32*, i32, i8**, i32*, i32)* }
%struct.jpeg_decomp_master = type { void (%struct.jpeg_decompress_struct*)*, void (%struct.jpeg_decompress_struct*)*, i32 }
%struct.jpeg_decompress_struct = type { %struct.jpeg_error_mgr*, %struct.jpeg_memory_mgr*, %struct.jpeg_progress_mgr*, i32, i32, %struct.jpeg_source_mgr*, i32, i32, i32, i32, i32, i32, i32, double, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i8**, i32, i32, i32, i32, i32, [64 x i32]*, [4 x %struct.JQUANT_TBL*], [4 x %struct.JHUFF_TBL*], [4 x %struct.JHUFF_TBL*], i32, %struct.jpeg_component_info*, i32, i32, [16 x i8], [16 x i8], [16 x i8], i32, i32, i8, i16, i16, i32, i8, i32, i32, i32, i32, i32, i8*, i32, [4 x %struct.jpeg_component_info*], i32, i32, i32, [10 x i32], i32, i32, i32, i32, i32, %struct.jpeg_decomp_master*, %struct.jpeg_d_main_controller*, %struct.jpeg_d_coef_controller*, %struct.jpeg_d_post_controller*, %struct.jpeg_input_controller*, %struct.jpeg_marker_reader*, %struct.jpeg_entropy_decoder*, %struct.jpeg_inverse_dct*, %struct.jpeg_upsampler*, %struct.jpeg_color_deconverter*, %struct.jpeg_color_quantizer* }
%struct.jpeg_entropy_decoder = type { void (%struct.jpeg_decompress_struct*)*, i32 (%struct.jpeg_decompress_struct*, [64 x i16]**)* }
%struct.jpeg_error_mgr = type { void (%struct.jpeg_common_struct*)*, void (%struct.jpeg_common_struct*, i32)*, void (%struct.jpeg_common_struct*)*, void (%struct.jpeg_common_struct*, i8*)*, void (%struct.jpeg_common_struct*)*, i32, %struct.anon, i32, i32, i8**, i32, i8**, i32, i32 }
%struct.jpeg_input_controller = type { i32 (%struct.jpeg_decompress_struct*)*, void (%struct.jpeg_decompress_struct*)*, void (%struct.jpeg_decompress_struct*)*, void (%struct.jpeg_decompress_struct*)*, i32, i32 }
%struct.jpeg_inverse_dct = type { void (%struct.jpeg_decompress_struct*)*, [10 x void (%struct.jpeg_decompress_struct*, %struct.jpeg_component_info*, i16*, i8**, i32)*] }
%struct.jpeg_marker_reader = type { void (%struct.jpeg_decompress_struct*)*, i32 (%struct.jpeg_decompress_struct*)*, i32 (%struct.jpeg_decompress_struct*)*, i32 (%struct.jpeg_decompress_struct*)*, [16 x i32 (%struct.jpeg_decompress_struct*)*], i32, i32, i32, i32 }
%struct.jpeg_memory_mgr = type { i8* (%struct.jpeg_common_struct*, i32, i32)*, i8* (%struct.jpeg_common_struct*, i32, i32)*, i8** (%struct.jpeg_common_struct*, i32, i32, i32)*, [64 x i16]** (%struct.jpeg_common_struct*, i32, i32, i32)*, %struct.jvirt_sarray_control* (%struct.jpeg_common_struct*, i32, i32, i32, i32, i32)*, %struct.jvirt_barray_control* (%struct.jpeg_common_struct*, i32, i32, i32, i32, i32)*, void (%struct.jpeg_common_struct*)*, i8** (%struct.jpeg_common_struct*, %struct.jvirt_sarray_control*, i32, i32, i32)*, [64 x i16]** (%struct.jpeg_common_struct*, %struct.jvirt_barray_control*, i32, i32, i32)*, void (%struct.jpeg_common_struct*, i32)*, void (%struct.jpeg_common_struct*)*, i32 }
%struct.jpeg_progress_mgr = type { void (%struct.jpeg_common_struct*)*, i32, i32, i32, i32 }
%struct.jpeg_source_mgr = type { i8*, i32, void (%struct.jpeg_decompress_struct*)*, i32 (%struct.jpeg_decompress_struct*)*, void (%struct.jpeg_decompress_struct*, i32)*, i32 (%struct.jpeg_decompress_struct*, i32)*, void (%struct.jpeg_decompress_struct*)* }
%struct.jpeg_upsampler = type { void (%struct.jpeg_decompress_struct*)*, void (%struct.jpeg_decompress_struct*, i8***, i32*, i32, i8**, i32*, i32)*, i32 }
%struct.jvirt_barray_control = type { [64 x i16]**, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, %struct.jvirt_barray_control*, %struct.backing_store_info }
%struct.jvirt_sarray_control = type { i8**, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, %struct.jvirt_sarray_control*, %struct.backing_store_info }
define void @jpeg_idct_float(%struct.jpeg_decompress_struct* nocapture %cinfo, %struct.jpeg_component_info* nocapture %compptr, i16* nocapture %coef_block, i8** nocapture %output_buf, i32 %output_col) nounwind {
entry:
%workspace = alloca [64 x float], align 4 ; <[64 x float]*> [#uses=11]
%0 = load i8*, i8** undef, align 4 ; <i8*> [#uses=5]
br label %bb
bb: ; preds = %bb, %entry
%indvar = phi i32 [ 0, %entry ], [ %indvar.next, %bb ] ; <i32> [#uses=11]
%tmp39 = add i32 %indvar, 8 ; <i32> [#uses=0]
%tmp41 = add i32 %indvar, 16 ; <i32> [#uses=2]
%scevgep42 = getelementptr [64 x float], [64 x float]* %workspace, i32 0, i32 %tmp41 ; <float*> [#uses=1]
%tmp43 = add i32 %indvar, 24 ; <i32> [#uses=1]
%scevgep44 = getelementptr [64 x float], [64 x float]* %workspace, i32 0, i32 %tmp43 ; <float*> [#uses=1]
%tmp45 = add i32 %indvar, 32 ; <i32> [#uses=1]
%scevgep46 = getelementptr [64 x float], [64 x float]* %workspace, i32 0, i32 %tmp45 ; <float*> [#uses=1]
%tmp47 = add i32 %indvar, 40 ; <i32> [#uses=1]
%scevgep48 = getelementptr [64 x float], [64 x float]* %workspace, i32 0, i32 %tmp47 ; <float*> [#uses=1]
%tmp49 = add i32 %indvar, 48 ; <i32> [#uses=1]
%scevgep50 = getelementptr [64 x float], [64 x float]* %workspace, i32 0, i32 %tmp49 ; <float*> [#uses=1]
%tmp51 = add i32 %indvar, 56 ; <i32> [#uses=1]
%scevgep52 = getelementptr [64 x float], [64 x float]* %workspace, i32 0, i32 %tmp51 ; <float*> [#uses=1]
%wsptr.119 = getelementptr [64 x float], [64 x float]* %workspace, i32 0, i32 %indvar ; <float*> [#uses=1]
%tmp54 = shl i32 %indvar, 2 ; <i32> [#uses=1]
%scevgep76 = getelementptr i8, i8* undef, i32 %tmp54 ; <i8*> [#uses=1]
%quantptr.118 = bitcast i8* %scevgep76 to float* ; <float*> [#uses=1]
%scevgep79 = getelementptr i16, i16* %coef_block, i32 %tmp41 ; <i16*> [#uses=0]
%inptr.117 = getelementptr i16, i16* %coef_block, i32 %indvar ; <i16*> [#uses=1]
%1 = load i16, i16* null, align 2 ; <i16> [#uses=1]
%2 = load i16, i16* undef, align 2 ; <i16> [#uses=1]
%3 = load i16, i16* %inptr.117, align 2 ; <i16> [#uses=1]
%4 = sitofp i16 %3 to float ; <float> [#uses=1]
%5 = load float, float* %quantptr.118, align 4 ; <float> [#uses=1]
%6 = fmul float %4, %5 ; <float> [#uses=1]
%7 = fsub float %6, undef ; <float> [#uses=2]
%8 = fmul float undef, 0x3FF6A09E60000000 ; <float> [#uses=1]
%9 = fsub float %8, 0.000000e+00 ; <float> [#uses=2]
%10 = fadd float undef, 0.000000e+00 ; <float> [#uses=2]
%11 = fadd float %7, %9 ; <float> [#uses=2]
%12 = fsub float %7, %9 ; <float> [#uses=2]
%13 = sitofp i16 %1 to float ; <float> [#uses=1]
%14 = fmul float %13, undef ; <float> [#uses=2]
%15 = sitofp i16 %2 to float ; <float> [#uses=1]
%16 = load float, float* undef, align 4 ; <float> [#uses=1]
%17 = fmul float %15, %16 ; <float> [#uses=1]
%18 = fadd float %14, undef ; <float> [#uses=2]
%19 = fsub float %14, undef ; <float> [#uses=2]
%20 = fadd float undef, %17 ; <float> [#uses=2]
%21 = fadd float %20, %18 ; <float> [#uses=3]
%22 = fsub float %20, %18 ; <float> [#uses=1]
%23 = fmul float %22, 0x3FF6A09E60000000 ; <float> [#uses=1]
%24 = fadd float %19, undef ; <float> [#uses=1]
%25 = fmul float %24, 0x3FFD906BC0000000 ; <float> [#uses=2]
%26 = fmul float undef, 0x3FF1517A80000000 ; <float> [#uses=1]
%27 = fsub float %26, %25 ; <float> [#uses=1]
%28 = fmul float %19, 0xC004E7AEA0000000 ; <float> [#uses=1]
%29 = fadd float %28, %25 ; <float> [#uses=1]
%30 = fsub float %29, %21 ; <float> [#uses=3]
%31 = fsub float %23, %30 ; <float> [#uses=3]
%32 = fadd float %27, %31 ; <float> [#uses=1]
%33 = fadd float %10, %21 ; <float> [#uses=1]
store float %33, float* %wsptr.119, align 4
%34 = fsub float %10, %21 ; <float> [#uses=1]
store float %34, float* %scevgep52, align 4
%35 = fadd float %11, %30 ; <float> [#uses=1]
store float %35, float* null, align 4
%36 = fsub float %11, %30 ; <float> [#uses=1]
store float %36, float* %scevgep50, align 4
%37 = fadd float %12, %31 ; <float> [#uses=1]
store float %37, float* %scevgep42, align 4
%38 = fsub float %12, %31 ; <float> [#uses=1]
store float %38, float* %scevgep48, align 4
%39 = fadd float undef, %32 ; <float> [#uses=1]
store float %39, float* %scevgep46, align 4
store float undef, float* %scevgep44, align 4
%indvar.next = add i32 %indvar, 1 ; <i32> [#uses=1]
br i1 undef, label %bb6, label %bb
bb6: ; preds = %bb
%.sum10 = add i32 %output_col, 1 ; <i32> [#uses=1]
%.sum8 = add i32 %output_col, 6 ; <i32> [#uses=1]
%.sum6 = add i32 %output_col, 2 ; <i32> [#uses=1]
%.sum = add i32 %output_col, 3 ; <i32> [#uses=1]
br label %bb8
bb8: ; preds = %bb8, %bb6
%ctr.116 = phi i32 [ 0, %bb6 ], [ %88, %bb8 ] ; <i32> [#uses=3]
%scevgep = getelementptr i8*, i8** %output_buf, i32 %ctr.116 ; <i8**> [#uses=1]
%tmp = shl i32 %ctr.116, 3 ; <i32> [#uses=5]
%tmp2392 = or i32 %tmp, 4 ; <i32> [#uses=1]
%scevgep24 = getelementptr [64 x float], [64 x float]* %workspace, i32 0, i32 %tmp2392 ; <float*> [#uses=1]
%tmp2591 = or i32 %tmp, 2 ; <i32> [#uses=1]
%scevgep26 = getelementptr [64 x float], [64 x float]* %workspace, i32 0, i32 %tmp2591 ; <float*> [#uses=1]
%tmp2790 = or i32 %tmp, 6 ; <i32> [#uses=1]
%scevgep28 = getelementptr [64 x float], [64 x float]* %workspace, i32 0, i32 %tmp2790 ; <float*> [#uses=1]
%tmp3586 = or i32 %tmp, 7 ; <i32> [#uses=0]
%wsptr.215 = getelementptr [64 x float], [64 x float]* %workspace, i32 0, i32 %tmp ; <float*> [#uses=1]
%40 = load i8*, i8** %scevgep, align 4 ; <i8*> [#uses=4]
%41 = load float, float* %wsptr.215, align 4 ; <float> [#uses=1]
%42 = load float, float* %scevgep24, align 4 ; <float> [#uses=1]
%43 = fadd float %41, %42 ; <float> [#uses=1]
%44 = load float, float* %scevgep26, align 4 ; <float> [#uses=1]
%45 = load float, float* %scevgep28, align 4 ; <float> [#uses=1]
%46 = fadd float %44, %45 ; <float> [#uses=1]
%47 = fsub float %43, %46 ; <float> [#uses=2]
%48 = fsub float undef, 0.000000e+00 ; <float> [#uses=1]
%49 = fadd float 0.000000e+00, undef ; <float> [#uses=1]
%50 = fptosi float %49 to i32 ; <i32> [#uses=1]
%51 = add i32 %50, 4 ; <i32> [#uses=1]
%52 = lshr i32 %51, 3 ; <i32> [#uses=1]
%53 = and i32 %52, 1023 ; <i32> [#uses=1]
%.sum14 = add i32 %53, 128 ; <i32> [#uses=1]
%54 = getelementptr i8, i8* %0, i32 %.sum14 ; <i8*> [#uses=1]
%55 = load i8, i8* %54, align 1 ; <i8> [#uses=1]
store i8 %55, i8* null, align 1
%56 = getelementptr i8, i8* %40, i32 %.sum10 ; <i8*> [#uses=1]
store i8 0, i8* %56, align 1
%57 = load i8, i8* null, align 1 ; <i8> [#uses=1]
%58 = getelementptr i8, i8* %40, i32 %.sum8 ; <i8*> [#uses=1]
store i8 %57, i8* %58, align 1
%59 = fadd float undef, %48 ; <float> [#uses=1]
%60 = fptosi float %59 to i32 ; <i32> [#uses=1]
%61 = add i32 %60, 4 ; <i32> [#uses=1]
%62 = lshr i32 %61, 3 ; <i32> [#uses=1]
%63 = and i32 %62, 1023 ; <i32> [#uses=1]
%.sum7 = add i32 %63, 128 ; <i32> [#uses=1]
%64 = getelementptr i8, i8* %0, i32 %.sum7 ; <i8*> [#uses=1]
%65 = load i8, i8* %64, align 1 ; <i8> [#uses=1]
%66 = getelementptr i8, i8* %40, i32 %.sum6 ; <i8*> [#uses=1]
store i8 %65, i8* %66, align 1
%67 = fptosi float undef to i32 ; <i32> [#uses=1]
%68 = add i32 %67, 4 ; <i32> [#uses=1]
%69 = lshr i32 %68, 3 ; <i32> [#uses=1]
%70 = and i32 %69, 1023 ; <i32> [#uses=1]
%.sum5 = add i32 %70, 128 ; <i32> [#uses=1]
%71 = getelementptr i8, i8* %0, i32 %.sum5 ; <i8*> [#uses=1]
%72 = load i8, i8* %71, align 1 ; <i8> [#uses=1]
store i8 %72, i8* undef, align 1
%73 = fadd float %47, undef ; <float> [#uses=1]
%74 = fptosi float %73 to i32 ; <i32> [#uses=1]
%75 = add i32 %74, 4 ; <i32> [#uses=1]
%76 = lshr i32 %75, 3 ; <i32> [#uses=1]
%77 = and i32 %76, 1023 ; <i32> [#uses=1]
%.sum3 = add i32 %77, 128 ; <i32> [#uses=1]
%78 = getelementptr i8, i8* %0, i32 %.sum3 ; <i8*> [#uses=1]
%79 = load i8, i8* %78, align 1 ; <i8> [#uses=1]
store i8 %79, i8* undef, align 1
%80 = fsub float %47, undef ; <float> [#uses=1]
%81 = fptosi float %80 to i32 ; <i32> [#uses=1]
%82 = add i32 %81, 4 ; <i32> [#uses=1]
%83 = lshr i32 %82, 3 ; <i32> [#uses=1]
%84 = and i32 %83, 1023 ; <i32> [#uses=1]
%.sum1 = add i32 %84, 128 ; <i32> [#uses=1]
%85 = getelementptr i8, i8* %0, i32 %.sum1 ; <i8*> [#uses=1]
%86 = load i8, i8* %85, align 1 ; <i8> [#uses=1]
%87 = getelementptr i8, i8* %40, i32 %.sum ; <i8*> [#uses=1]
store i8 %86, i8* %87, align 1
%88 = add i32 %ctr.116, 1 ; <i32> [#uses=2]
%exitcond = icmp eq i32 %88, 8 ; <i1> [#uses=1]
br i1 %exitcond, label %return, label %bb8
return: ; preds = %bb8
ret void
}

View File

@ -0,0 +1,85 @@
; RUN: llc < %s -mtriple=thumbv7-apple-darwin9 -mcpu=cortex-a8 -relocation-model=pic -disable-fp-elim -arm-atomic-cfg-tidy=0 | FileCheck %s
@csize = external global [100 x [20 x [4 x i8]]] ; <[100 x [20 x [4 x i8]]]*> [#uses=1]
@vsize = external global [100 x [20 x [4 x i8]]] ; <[100 x [20 x [4 x i8]]]*> [#uses=1]
@cll = external global [20 x [10 x i8]] ; <[20 x [10 x i8]]*> [#uses=1]
@lefline = external global [100 x [20 x i32]] ; <[100 x [20 x i32]]*> [#uses=1]
@sep = external global [20 x i32] ; <[20 x i32]*> [#uses=1]
define void @main(i32 %argc, i8** %argv) noreturn nounwind {
; CHECK-LABEL: main:
; CHECK: ldrb
entry:
%nb.i.i.i = alloca [25 x i8], align 1 ; <[25 x i8]*> [#uses=0]
%line.i.i.i = alloca [200 x i8], align 1 ; <[200 x i8]*> [#uses=1]
%line.i = alloca [1024 x i8], align 1 ; <[1024 x i8]*> [#uses=0]
br i1 undef, label %bb.i.i, label %bb4.preheader.i
bb.i.i: ; preds = %entry
unreachable
bb4.preheader.i: ; preds = %entry
br i1 undef, label %tbl.exit, label %bb.i.preheader
bb.i.preheader: ; preds = %bb4.preheader.i
%line3.i.i.i = getelementptr [200 x i8], [200 x i8]* %line.i.i.i, i32 0, i32 0 ; <i8*> [#uses=1]
br label %bb.i
bb.i: ; preds = %bb4.backedge.i, %bb.i.preheader
br i1 undef, label %bb3.i, label %bb4.backedge.i
bb3.i: ; preds = %bb.i
br i1 undef, label %bb2.i184.i.i, label %bb.i183.i.i
bb.i183.i.i: ; preds = %bb.i183.i.i, %bb3.i
br i1 undef, label %bb2.i184.i.i, label %bb.i183.i.i
bb2.i184.i.i: ; preds = %bb.i183.i.i, %bb3.i
br i1 undef, label %bb5.i185.i.i, label %bb35.preheader.i.i.i
bb35.preheader.i.i.i: ; preds = %bb2.i184.i.i
%0 = load i8, i8* %line3.i.i.i, align 1 ; <i8> [#uses=1]
%1 = icmp eq i8 %0, 59 ; <i1> [#uses=1]
br i1 %1, label %bb36.i.i.i, label %bb9.i186.i.i
bb5.i185.i.i: ; preds = %bb2.i184.i.i
br label %bb.i171.i.i
bb9.i186.i.i: ; preds = %bb35.preheader.i.i.i
unreachable
bb36.i.i.i: ; preds = %bb35.preheader.i.i.i
br label %bb.i171.i.i
bb.i171.i.i: ; preds = %bb3.i176.i.i, %bb36.i.i.i, %bb5.i185.i.i
%2 = phi i32 [ %4, %bb3.i176.i.i ], [ 0, %bb36.i.i.i ], [ 0, %bb5.i185.i.i ] ; <i32> [#uses=6]
%scevgep16.i.i.i = getelementptr [20 x i32], [20 x i32]* @sep, i32 0, i32 %2 ; <i32*> [#uses=1]
%scevgep18.i.i.i = getelementptr [20 x [10 x i8]], [20 x [10 x i8]]* @cll, i32 0, i32 %2, i32 0 ; <i8*> [#uses=0]
store i32 -1, i32* %scevgep16.i.i.i, align 4
br label %bb1.i175.i.i
bb1.i175.i.i: ; preds = %bb1.i175.i.i, %bb.i171.i.i
%i.03.i172.i.i = phi i32 [ 0, %bb.i171.i.i ], [ %3, %bb1.i175.i.i ] ; <i32> [#uses=4]
%scevgep11.i.i.i = getelementptr [100 x [20 x i32]], [100 x [20 x i32]]* @lefline, i32 0, i32 %i.03.i172.i.i, i32 %2 ; <i32*> [#uses=1]
%scevgep12.i.i.i = getelementptr [100 x [20 x [4 x i8]]], [100 x [20 x [4 x i8]]]* @vsize, i32 0, i32 %i.03.i172.i.i, i32 %2, i32 0 ; <i8*> [#uses=1]
%scevgep13.i.i.i = getelementptr [100 x [20 x [4 x i8]]], [100 x [20 x [4 x i8]]]* @csize, i32 0, i32 %i.03.i172.i.i, i32 %2, i32 0 ; <i8*> [#uses=0]
store i8 0, i8* %scevgep12.i.i.i, align 1
store i32 0, i32* %scevgep11.i.i.i, align 4
store i32 108, i32* undef, align 4
%3 = add i32 %i.03.i172.i.i, 1 ; <i32> [#uses=2]
%exitcond.i174.i.i = icmp eq i32 %3, 100 ; <i1> [#uses=1]
br i1 %exitcond.i174.i.i, label %bb3.i176.i.i, label %bb1.i175.i.i
bb3.i176.i.i: ; preds = %bb1.i175.i.i
%4 = add i32 %2, 1 ; <i32> [#uses=1]
br i1 undef, label %bb5.i177.i.i, label %bb.i171.i.i
bb5.i177.i.i: ; preds = %bb3.i176.i.i
unreachable
bb4.backedge.i: ; preds = %bb.i
br i1 undef, label %tbl.exit, label %bb.i
tbl.exit: ; preds = %bb4.backedge.i, %bb4.preheader.i
unreachable
}

View File

@ -0,0 +1,46 @@
; RUN: llc < %s -mtriple=thumbv7-apple-darwin9 -mcpu=cortex-a8 -relocation-model=pic -disable-fp-elim
%0 = type { void (%"struct.xalanc_1_8::FormatterToXML"*, i16)*, i32 } ; type %0
%1 = type { void (%"struct.xalanc_1_8::FormatterToXML"*, i16*)*, i32 } ; type %1
%2 = type { void (%"struct.xalanc_1_8::FormatterToXML"*, %"struct.xalanc_1_8::XalanDOMString"*)*, i32 } ; type %2
%3 = type { void (%"struct.xalanc_1_8::FormatterToXML"*, i16*, i32, i32)*, i32 } ; type %3
%4 = type { void (%"struct.xalanc_1_8::FormatterToXML"*)*, i32 } ; type %4
%"struct.std::CharVectorType" = type { %"struct.std::_Vector_base<char,std::allocator<char> >" }
%"struct.std::_Bit_const_iterator" = type { %"struct.std::_Bit_iterator_base" }
%"struct.std::_Bit_iterator_base" = type { i32*, i32 }
%"struct.std::_Bvector_base<std::allocator<bool> >" = type { %"struct.std::_Bvector_base<std::allocator<bool> >::_Bvector_impl" }
%"struct.std::_Bvector_base<std::allocator<bool> >::_Bvector_impl" = type { %"struct.std::_Bit_const_iterator", %"struct.std::_Bit_const_iterator", i32* }
%"struct.std::_Vector_base<char,std::allocator<char> >" = type { %"struct.std::_Vector_base<char,std::allocator<char> >::_Vector_impl" }
%"struct.std::_Vector_base<char,std::allocator<char> >::_Vector_impl" = type { i8*, i8*, i8* }
%"struct.std::_Vector_base<short unsigned int,std::allocator<short unsigned int> >" = type { %"struct.std::_Vector_base<short unsigned int,std::allocator<short unsigned int> >::_Vector_impl" }
%"struct.std::_Vector_base<short unsigned int,std::allocator<short unsigned int> >::_Vector_impl" = type { i16*, i16*, i16* }
%"struct.std::basic_ostream<char,std::char_traits<char> >.base" = type { i32 (...)** }
%"struct.std::vector<bool,std::allocator<bool> >" = type { %"struct.std::_Bvector_base<std::allocator<bool> >" }
%"struct.std::vector<short unsigned int,std::allocator<short unsigned int> >" = type { %"struct.std::_Vector_base<short unsigned int,std::allocator<short unsigned int> >" }
%"struct.xalanc_1_8::FormatterListener" = type { %"struct.std::basic_ostream<char,std::char_traits<char> >.base", %"struct.std::basic_ostream<char,std::char_traits<char> >.base"*, i32 }
%"struct.xalanc_1_8::FormatterToXML" = type { %"struct.xalanc_1_8::FormatterListener", %"struct.std::basic_ostream<char,std::char_traits<char> >.base"*, %"struct.xalanc_1_8::XalanOutputStream"*, i16, [256 x i16], [256 x i16], i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, %"struct.xalanc_1_8::XalanDOMString", %"struct.xalanc_1_8::XalanDOMString", %"struct.xalanc_1_8::XalanDOMString", i32, i32, %"struct.std::vector<bool,std::allocator<bool> >", %"struct.xalanc_1_8::XalanDOMString", i8, i8, i8, i8, i8, %"struct.xalanc_1_8::XalanDOMString", %"struct.xalanc_1_8::XalanDOMString", %"struct.xalanc_1_8::XalanDOMString", %"struct.xalanc_1_8::XalanDOMString", %"struct.std::vector<short unsigned int,std::allocator<short unsigned int> >", i32, %"struct.std::CharVectorType", %"struct.std::vector<bool,std::allocator<bool> >", %0, %1, %2, %3, %0, %1, %2, %3, %4, i16*, i32 }
%"struct.xalanc_1_8::XalanDOMString" = type { %"struct.std::vector<short unsigned int,std::allocator<short unsigned int> >", i32 }
%"struct.xalanc_1_8::XalanOutputStream" = type { i32 (...)**, i32, %"struct.std::basic_ostream<char,std::char_traits<char> >.base"*, i32, %"struct.std::vector<short unsigned int,std::allocator<short unsigned int> >", %"struct.xalanc_1_8::XalanDOMString", i8, i8, %"struct.std::CharVectorType" }
declare void @_ZN10xalanc_1_814FormatterToXML17writeParentTagEndEv(%"struct.xalanc_1_8::FormatterToXML"*)
define void @_ZN10xalanc_1_814FormatterToXML5cdataEPKtj(%"struct.xalanc_1_8::FormatterToXML"* %this, i16* %ch, i32 %length) {
entry:
%0 = getelementptr %"struct.xalanc_1_8::FormatterToXML", %"struct.xalanc_1_8::FormatterToXML"* %this, i32 0, i32 13 ; <i8*> [#uses=1]
br i1 undef, label %bb4, label %bb
bb: ; preds = %entry
store i8 0, i8* %0, align 1
%1 = getelementptr %"struct.xalanc_1_8::FormatterToXML", %"struct.xalanc_1_8::FormatterToXML"* %this, i32 0, i32 0, i32 0, i32 0 ; <i32 (...)***> [#uses=1]
%2 = load i32 (...)**, i32 (...)*** %1, align 4 ; <i32 (...)**> [#uses=1]
%3 = getelementptr i32 (...)*, i32 (...)** %2, i32 11 ; <i32 (...)**> [#uses=1]
%4 = load i32 (...)*, i32 (...)** %3, align 4 ; <i32 (...)*> [#uses=1]
%5 = bitcast i32 (...)* %4 to void (%"struct.xalanc_1_8::FormatterToXML"*, i16*, i32)* ; <void (%"struct.xalanc_1_8::FormatterToXML"*, i16*, i32)*> [#uses=1]
tail call void %5(%"struct.xalanc_1_8::FormatterToXML"* %this, i16* %ch, i32 %length)
ret void
bb4: ; preds = %entry
tail call void @_ZN10xalanc_1_814FormatterToXML17writeParentTagEndEv(%"struct.xalanc_1_8::FormatterToXML"* %this)
tail call void undef(%"struct.xalanc_1_8::FormatterToXML"* %this, i16* %ch, i32 0, i32 %length, i8 zeroext undef)
ret void
}

View File

@ -0,0 +1,29 @@
; RUN: llc < %s -mtriple=thumbv7-none-linux-gnueabi
; PR4681
%struct.FILE = type { i32, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, %struct._IO_marker*, %struct.FILE*, i32, i32, i32, i16, i8, [1 x i8], i8*, i64, i8*, i8*, i8*, i8*, i32, i32, [40 x i8] }
%struct._IO_marker = type { %struct._IO_marker*, %struct.FILE*, i32 }
@.str2 = external constant [30 x i8], align 1 ; <[30 x i8]*> [#uses=1]
define i32 @__mf_heuristic_check(i32 %ptr, i32 %ptr_high) nounwind {
entry:
br i1 undef, label %bb1, label %bb
bb: ; preds = %entry
unreachable
bb1: ; preds = %entry
br i1 undef, label %bb9, label %bb2
bb2: ; preds = %bb1
%0 = call i8* @llvm.frameaddress(i32 0) ; <i8*> [#uses=1]
%1 = call i32 (%struct.FILE*, i8*, ...) @fprintf(%struct.FILE* noalias undef, i8* noalias getelementptr ([30 x i8], [30 x i8]* @.str2, i32 0, i32 0), i8* %0, i8* null) nounwind ; <i32> [#uses=0]
unreachable
bb9: ; preds = %bb1
ret i32 undef
}
declare i8* @llvm.frameaddress(i32) nounwind readnone
declare i32 @fprintf(%struct.FILE* noalias nocapture, i8* noalias nocapture, ...) nounwind

View File

@ -0,0 +1,153 @@
; RUN: llc < %s -mtriple=thumbv7-apple-darwin -mcpu=cortex-a8 -relocation-model=pic -disable-fp-elim
%0 = type { %struct.GAP } ; type %0
%1 = type { i16, i8, i8 } ; type %1
%2 = type { [2 x i32], [2 x i32] } ; type %2
%3 = type { %struct.rec* } ; type %3
%4 = type { i8, i8, i16, i8, i8, i8, i8 } ; type %4
%struct.FILE = type { i8*, i32, i32, i16, i16, %struct.__sbuf, i32, i8*, i32 (i8*)*, i32 (i8*, i8*, i32)*, i64 (i8*, i64, i32)*, i32 (i8*, i8*, i32)*, %struct.__sbuf, %struct.__sFILEX*, i32, [3 x i8], [1 x i8], %struct.__sbuf, i32, i64 }
%struct.FILE_POS = type { i8, i8, i16, i32 }
%struct.FIRST_UNION = type { %struct.FILE_POS }
%struct.FOURTH_UNION = type { %struct.STYLE }
%struct.GAP = type { i8, i8, i16 }
%struct.LIST = type { %struct.rec*, %struct.rec* }
%struct.SECOND_UNION = type { %1 }
%struct.STYLE = type { %0, %0, i16, i16, i32 }
%struct.THIRD_UNION = type { %2 }
%struct.__sFILEX = type opaque
%struct.__sbuf = type { i8*, i32 }
%struct.head_type = type { [2 x %struct.LIST], %struct.FIRST_UNION, %struct.SECOND_UNION, %struct.THIRD_UNION, %struct.FOURTH_UNION, %struct.rec*, %3, %struct.rec*, %struct.rec*, %struct.rec*, %struct.rec*, %struct.rec*, %struct.rec*, %struct.rec*, %struct.rec*, i32 }
%struct.rec = type { %struct.head_type }
@.str24239 = external constant [20 x i8], align 1 ; <[20 x i8]*> [#uses=1]
@no_file_pos = external global %4 ; <%4*> [#uses=1]
@zz_tmp = external global %struct.rec* ; <%struct.rec**> [#uses=1]
@.str81872 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=1]
@out_fp = external global %struct.FILE* ; <%struct.FILE**> [#uses=2]
@cpexists = external global i32 ; <i32*> [#uses=2]
@.str212784 = external constant [17 x i8], align 1 ; <[17 x i8]*> [#uses=1]
@.str1822946 = external constant [8 x i8], align 1 ; <[8 x i8]*> [#uses=1]
@.str1842948 = external constant [11 x i8], align 1 ; <[11 x i8]*> [#uses=1]
declare i32 @fprintf(%struct.FILE* nocapture, i8* nocapture, ...) nounwind
declare i32 @"\01_fwrite"(i8*, i32, i32, i8*)
declare %struct.FILE* @OpenIncGraphicFile(i8*, i8 zeroext, %struct.rec** nocapture, %struct.FILE_POS*, i32* nocapture) nounwind
declare void @Error(i32, i32, i8*, i32, %struct.FILE_POS*, ...) nounwind
declare i8* @fgets(i8*, i32, %struct.FILE* nocapture) nounwind
define void @PS_PrintGraphicInclude(%struct.rec* %x, i32 %colmark, i32 %rowmark) nounwind {
entry:
br label %bb5
bb5: ; preds = %bb5, %entry
%.pn = phi %struct.rec* [ %y.0, %bb5 ], [ undef, %entry ] ; <%struct.rec*> [#uses=1]
%y.0.in = getelementptr %struct.rec, %struct.rec* %.pn, i32 0, i32 0, i32 0, i32 1, i32 0 ; <%struct.rec**> [#uses=1]
%y.0 = load %struct.rec*, %struct.rec** %y.0.in ; <%struct.rec*> [#uses=2]
br i1 undef, label %bb5, label %bb6
bb6: ; preds = %bb5
%0 = call %struct.FILE* @OpenIncGraphicFile(i8* undef, i8 zeroext 0, %struct.rec** undef, %struct.FILE_POS* null, i32* undef) nounwind ; <%struct.FILE*> [#uses=1]
br i1 false, label %bb.i, label %FontHalfXHeight.exit
bb.i: ; preds = %bb6
br label %FontHalfXHeight.exit
FontHalfXHeight.exit: ; preds = %bb.i, %bb6
br i1 undef, label %bb.i1, label %FontSize.exit
bb.i1: ; preds = %FontHalfXHeight.exit
br label %FontSize.exit
FontSize.exit: ; preds = %bb.i1, %FontHalfXHeight.exit
%1 = load i32, i32* undef, align 4 ; <i32> [#uses=1]
%2 = icmp ult i32 0, undef ; <i1> [#uses=1]
br i1 %2, label %bb.i5, label %FontName.exit
bb.i5: ; preds = %FontSize.exit
call void (i32, i32, i8*, i32, %struct.FILE_POS*, ...) @Error(i32 1, i32 2, i8* getelementptr ([20 x i8], [20 x i8]* @.str24239, i32 0, i32 0), i32 0, %struct.FILE_POS* bitcast (%4* @no_file_pos to %struct.FILE_POS*), i8* getelementptr ([10 x i8], [10 x i8]* @.str81872, i32 0, i32 0)) nounwind
br label %FontName.exit
FontName.exit: ; preds = %bb.i5, %FontSize.exit
%3 = call i32 (%struct.FILE*, i8*, ...) @fprintf(%struct.FILE* undef, i8* getelementptr ([8 x i8], [8 x i8]* @.str1822946, i32 0, i32 0), i32 %1, i8* undef) nounwind ; <i32> [#uses=0]
%4 = call i32 @"\01_fwrite"(i8* getelementptr ([11 x i8], [11 x i8]* @.str1842948, i32 0, i32 0), i32 1, i32 10, i8* undef) nounwind ; <i32> [#uses=0]
%5 = sub i32 %colmark, undef ; <i32> [#uses=1]
%6 = sub i32 %rowmark, undef ; <i32> [#uses=1]
%7 = load %struct.FILE*, %struct.FILE** @out_fp, align 4 ; <%struct.FILE*> [#uses=1]
%8 = call i32 (%struct.FILE*, i8*, ...) @fprintf(%struct.FILE* %7, i8* getelementptr ([17 x i8], [17 x i8]* @.str212784, i32 0, i32 0), i32 %5, i32 %6) nounwind ; <i32> [#uses=0]
store i32 0, i32* @cpexists, align 4
%9 = getelementptr %struct.rec, %struct.rec* %y.0, i32 0, i32 0, i32 3, i32 0, i32 0, i32 1 ; <i32*> [#uses=1]
%10 = load i32, i32* %9, align 4 ; <i32> [#uses=1]
%11 = sub i32 0, %10 ; <i32> [#uses=1]
%12 = load %struct.FILE*, %struct.FILE** @out_fp, align 4 ; <%struct.FILE*> [#uses=1]
%13 = call i32 (%struct.FILE*, i8*, ...) @fprintf(%struct.FILE* %12, i8* getelementptr ([17 x i8], [17 x i8]* @.str212784, i32 0, i32 0), i32 undef, i32 %11) nounwind ; <i32> [#uses=0]
store i32 0, i32* @cpexists, align 4
br label %bb100.outer.outer
bb100.outer.outer: ; preds = %bb79.critedge, %bb1.i3, %FontName.exit
%x_addr.0.ph.ph = phi %struct.rec* [ %x, %FontName.exit ], [ null, %bb79.critedge ], [ null, %bb1.i3 ] ; <%struct.rec*> [#uses=1]
%14 = getelementptr %struct.rec, %struct.rec* %x_addr.0.ph.ph, i32 0, i32 0, i32 1, i32 0 ; <%struct.FILE_POS*> [#uses=0]
br label %bb100.outer
bb.i80: ; preds = %bb3.i85
br i1 undef, label %bb2.i84, label %bb2.i51
bb2.i84: ; preds = %bb100.outer, %bb.i80
br i1 undef, label %bb3.i77, label %bb3.i85
bb3.i85: ; preds = %bb2.i84
br i1 false, label %StringBeginsWith.exit88, label %bb.i80
StringBeginsWith.exit88: ; preds = %bb3.i85
br i1 undef, label %bb3.i77, label %bb2.i51
bb2.i.i68: ; preds = %bb3.i77
br label %bb3.i77
bb3.i77: ; preds = %bb2.i.i68, %StringBeginsWith.exit88, %bb2.i84
br i1 false, label %bb1.i58, label %bb2.i.i68
bb1.i58: ; preds = %bb3.i77
unreachable
bb.i47: ; preds = %bb3.i52
br i1 undef, label %bb2.i51, label %bb2.i.i15.critedge
bb2.i51: ; preds = %bb.i47, %StringBeginsWith.exit88, %bb.i80
%15 = load i8, i8* undef, align 1 ; <i8> [#uses=0]
br i1 false, label %StringBeginsWith.exit55thread-split, label %bb3.i52
bb3.i52: ; preds = %bb2.i51
br i1 false, label %StringBeginsWith.exit55, label %bb.i47
StringBeginsWith.exit55thread-split: ; preds = %bb2.i51
br label %StringBeginsWith.exit55
StringBeginsWith.exit55: ; preds = %StringBeginsWith.exit55thread-split, %bb3.i52
br label %bb2.i41
bb2.i41: ; preds = %bb2.i41, %StringBeginsWith.exit55
br label %bb2.i41
bb2.i.i15.critedge: ; preds = %bb.i47
%16 = call i8* @fgets(i8* undef, i32 512, %struct.FILE* %0) nounwind ; <i8*> [#uses=0]
%iftmp.560.0 = select i1 undef, i32 2, i32 0 ; <i32> [#uses=1]
br label %bb100.outer
bb2.i8: ; preds = %bb100.outer
br i1 undef, label %bb1.i3, label %bb79.critedge
bb1.i3: ; preds = %bb2.i8
br label %bb100.outer.outer
bb79.critedge: ; preds = %bb2.i8
store %struct.rec* null, %struct.rec** @zz_tmp, align 4
br label %bb100.outer.outer
bb100.outer: ; preds = %bb2.i.i15.critedge, %bb100.outer.outer
%state.0.ph = phi i32 [ 0, %bb100.outer.outer ], [ %iftmp.560.0, %bb2.i.i15.critedge ] ; <i32> [#uses=1]
%cond = icmp eq i32 %state.0.ph, 1 ; <i1> [#uses=1]
br i1 %cond, label %bb2.i8, label %bb2.i84
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,33 @@
; RUN: llc < %s -mtriple=thumbv7-apple-darwin9 -mcpu=cortex-a8 | not grep fcpys
; rdar://7117307
%struct.Hosp = type { i32, i32, i32, %struct.List, %struct.List, %struct.List, %struct.List }
%struct.List = type { %struct.List*, %struct.Patient*, %struct.List* }
%struct.Patient = type { i32, i32, i32, %struct.Village* }
%struct.Results = type { float, float, float }
%struct.Village = type { [4 x %struct.Village*], %struct.Village*, %struct.List, %struct.Hosp, i32, i32 }
define void @get_results(%struct.Results* noalias nocapture sret %agg.result, %struct.Village* %village) nounwind {
entry:
br i1 undef, label %bb, label %bb6.preheader
bb6.preheader: ; preds = %entry
call void @llvm.memcpy.p0i8.p0i8.i32(i8* undef, i8* undef, i32 12, i32 4, i1 false)
br i1 undef, label %bb15, label %bb13
bb: ; preds = %entry
ret void
bb13: ; preds = %bb13, %bb6.preheader
%0 = fadd float undef, undef ; <float> [#uses=1]
%1 = fadd float undef, 1.000000e+00 ; <float> [#uses=1]
br i1 undef, label %bb15, label %bb13
bb15: ; preds = %bb13, %bb6.preheader
%r1.0.0.lcssa = phi float [ 0.000000e+00, %bb6.preheader ], [ %1, %bb13 ] ; <float> [#uses=1]
%r1.1.0.lcssa = phi float [ undef, %bb6.preheader ], [ %0, %bb13 ] ; <float> [#uses=0]
store float %r1.0.0.lcssa, float* undef, align 4
ret void
}
declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind

View File

@ -0,0 +1,42 @@
; RUN: llc < %s -mtriple=thumbv7-apple-darwin9 -mcpu=cortex-a8
; rdar://7117307
%struct.Hosp = type { i32, i32, i32, %struct.List, %struct.List, %struct.List, %struct.List }
%struct.List = type { %struct.List*, %struct.Patient*, %struct.List* }
%struct.Patient = type { i32, i32, i32, %struct.Village* }
%struct.Village = type { [4 x %struct.Village*], %struct.Village*, %struct.List, %struct.Hosp, i32, i32 }
define %struct.List* @sim(%struct.Village* %village) nounwind {
entry:
br i1 undef, label %bb14, label %bb3.preheader
bb3.preheader: ; preds = %entry
br label %bb5
bb5: ; preds = %bb5, %bb3.preheader
br i1 undef, label %bb11, label %bb5
bb11: ; preds = %bb5
%0 = fmul float undef, 0x41E0000000000000 ; <float> [#uses=1]
%1 = fptosi float %0 to i32 ; <i32> [#uses=1]
store i32 %1, i32* undef, align 4
br i1 undef, label %generate_patient.exit, label %generate_patient.exit.thread
generate_patient.exit.thread: ; preds = %bb11
ret %struct.List* null
generate_patient.exit: ; preds = %bb11
br i1 undef, label %bb14, label %bb12
bb12: ; preds = %generate_patient.exit
br i1 undef, label %bb.i, label %bb1.i
bb.i: ; preds = %bb12
ret %struct.List* null
bb1.i: ; preds = %bb12
ret %struct.List* null
bb14: ; preds = %generate_patient.exit, %entry
ret %struct.List* undef
}

View File

@ -0,0 +1,54 @@
; RUN: llc < %s -mtriple=thumbv7-apple-darwin9 -mcpu=cortex-a8
; rdar://7117307
%struct.Hosp = type { i32, i32, i32, %struct.List, %struct.List, %struct.List, %struct.List }
%struct.List = type { %struct.List*, %struct.Patient*, %struct.List* }
%struct.Patient = type { i32, i32, i32, %struct.Village* }
%struct.Village = type { [4 x %struct.Village*], %struct.Village*, %struct.List, %struct.Hosp, i32, i32 }
define %struct.List* @sim(%struct.Village* %village) nounwind {
entry:
br i1 undef, label %bb14, label %bb3.preheader
bb3.preheader: ; preds = %entry
br label %bb5
bb5: ; preds = %bb5, %bb3.preheader
br i1 undef, label %bb11, label %bb5
bb11: ; preds = %bb5
%0 = load i32, i32* undef, align 4 ; <i32> [#uses=1]
%1 = xor i32 %0, 123459876 ; <i32> [#uses=1]
%2 = sdiv i32 %1, 127773 ; <i32> [#uses=1]
%3 = mul i32 %2, 2836 ; <i32> [#uses=1]
%4 = sub i32 0, %3 ; <i32> [#uses=1]
%5 = xor i32 %4, 123459876 ; <i32> [#uses=1]
%idum_addr.0.i.i = select i1 undef, i32 undef, i32 %5 ; <i32> [#uses=1]
%6 = sitofp i32 %idum_addr.0.i.i to double ; <double> [#uses=1]
%7 = fmul double %6, 0x3E00000000200000 ; <double> [#uses=1]
%8 = fptrunc double %7 to float ; <float> [#uses=2]
%9 = fmul float %8, 0x41E0000000000000 ; <float> [#uses=1]
%10 = fptosi float %9 to i32 ; <i32> [#uses=1]
store i32 %10, i32* undef, align 4
%11 = fpext float %8 to double ; <double> [#uses=1]
%12 = fcmp ogt double %11, 6.660000e-01 ; <i1> [#uses=1]
br i1 %12, label %generate_patient.exit, label %generate_patient.exit.thread
generate_patient.exit.thread: ; preds = %bb11
ret %struct.List* null
generate_patient.exit: ; preds = %bb11
br i1 undef, label %bb14, label %bb12
bb12: ; preds = %generate_patient.exit
br i1 undef, label %bb.i, label %bb1.i
bb.i: ; preds = %bb12
ret %struct.List* null
bb1.i: ; preds = %bb12
ret %struct.List* null
bb14: ; preds = %generate_patient.exit, %entry
ret %struct.List* undef
}

View File

@ -0,0 +1,32 @@
; RUN: llc < %s -mtriple=thumbv7-none-linux-gnueabi -arm-atomic-cfg-tidy=0 | FileCheck %s
; PR4659
; PR4682
define hidden i32 @__gcov_execlp(i8* %path, i8* %arg, ...) nounwind {
entry:
; CHECK-LABEL: __gcov_execlp:
; CHECK: sub sp, #8
; CHECK: push
; CHECK: add r7, sp, #8
; CHECK: sub.w r4, r7, #8
; CHECK: mov sp, r4
; CHECK-NOT: mov sp, r7
; CHECK: add sp, #8
call void @__gcov_flush() nounwind
call void @llvm.va_start(i8* null)
br i1 undef, label %bb5, label %bb
bb: ; preds = %bb, %entry
br i1 undef, label %bb5, label %bb
bb5: ; preds = %bb, %entry
%0 = alloca i8*, i32 undef, align 4 ; <i8**> [#uses=1]
%1 = call i32 @execvp(i8* %path, i8** %0) nounwind ; <i32> [#uses=1]
ret i32 %1
}
declare hidden void @__gcov_flush()
declare i32 @execvp(i8*, i8**) nounwind
declare void @llvm.va_start(i8*) nounwind

View File

@ -0,0 +1,16 @@
; RUN: llc < %s -mtriple=armv7-eabi -mattr=+vfp2
; PR4686
%a = type { i32 (...)** }
%b = type { %a }
%c = type { float, float, float, float }
declare arm_aapcs_vfpcc float @bar(%c*)
define arm_aapcs_vfpcc void @foo(%b* %x, %c* %y) {
entry:
%0 = call arm_aapcs_vfpcc float @bar(%c* %y) ; <float> [#uses=0]
%1 = fadd float undef, undef ; <float> [#uses=1]
store float %1, float* undef, align 8
ret void
}

View File

@ -0,0 +1,80 @@
; RUN: llc < %s -mtriple=thumbv7-apple-darwin10 -mcpu=cortex-a8
%struct.FILE = type { i8*, i32, i32, i16, i16, %struct.__sbuf, i32, i8*, i32 (i8*)*, i32 (i8*, i8*, i32)*, i64 (i8*, i64, i32)*, i32 (i8*, i8*, i32)*, %struct.__sbuf, %struct.__sFILEX*, i32, [3 x i8], [1 x i8], %struct.__sbuf, i32, i64 }
%struct.JHUFF_TBL = type { [17 x i8], [256 x i8], i32 }
%struct.JQUANT_TBL = type { [64 x i16], i32 }
%struct.__sFILEX = type opaque
%struct.__sbuf = type { i8*, i32 }
%struct.anon = type { [8 x i32], [48 x i8] }
%struct.backing_store_info = type { void (%struct.jpeg_common_struct*, %struct.backing_store_info*, i8*, i32, i32)*, void (%struct.jpeg_common_struct*, %struct.backing_store_info*, i8*, i32, i32)*, void (%struct.jpeg_common_struct*, %struct.backing_store_info*)*, %struct.FILE*, [64 x i8] }
%struct.jpeg_color_deconverter = type { void (%struct.jpeg_decompress_struct*)*, void (%struct.jpeg_decompress_struct*, i8***, i32, i8**, i32)* }
%struct.jpeg_color_quantizer = type { void (%struct.jpeg_decompress_struct*, i32)*, void (%struct.jpeg_decompress_struct*, i8**, i8**, i32)*, void (%struct.jpeg_decompress_struct*)*, void (%struct.jpeg_decompress_struct*)* }
%struct.jpeg_common_struct = type { %struct.jpeg_error_mgr*, %struct.jpeg_memory_mgr*, %struct.jpeg_progress_mgr*, i32, i32 }
%struct.jpeg_component_info = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, %struct.JQUANT_TBL*, i8* }
%struct.jpeg_d_coef_controller = type { void (%struct.jpeg_decompress_struct*)*, i32 (%struct.jpeg_decompress_struct*)*, void (%struct.jpeg_decompress_struct*)*, i32 (%struct.jpeg_decompress_struct*, i8***)*, %struct.jvirt_barray_control** }
%struct.jpeg_d_main_controller = type { void (%struct.jpeg_decompress_struct*, i32)*, void (%struct.jpeg_decompress_struct*, i8**, i32*, i32)* }
%struct.jpeg_d_post_controller = type { void (%struct.jpeg_decompress_struct*, i32)*, void (%struct.jpeg_decompress_struct*, i8***, i32*, i32, i8**, i32*, i32)* }
%struct.jpeg_decomp_master = type { void (%struct.jpeg_decompress_struct*)*, void (%struct.jpeg_decompress_struct*)*, i32 }
%struct.jpeg_decompress_struct = type { %struct.jpeg_error_mgr*, %struct.jpeg_memory_mgr*, %struct.jpeg_progress_mgr*, i32, i32, %struct.jpeg_source_mgr*, i32, i32, i32, i32, i32, i32, i32, double, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i8**, i32, i32, i32, i32, i32, [64 x i32]*, [4 x %struct.JQUANT_TBL*], [4 x %struct.JHUFF_TBL*], [4 x %struct.JHUFF_TBL*], i32, %struct.jpeg_component_info*, i32, i32, [16 x i8], [16 x i8], [16 x i8], i32, i32, i8, i16, i16, i32, i8, i32, i32, i32, i32, i32, i8*, i32, [4 x %struct.jpeg_component_info*], i32, i32, i32, [10 x i32], i32, i32, i32, i32, i32, %struct.jpeg_decomp_master*, %struct.jpeg_d_main_controller*, %struct.jpeg_d_coef_controller*, %struct.jpeg_d_post_controller*, %struct.jpeg_input_controller*, %struct.jpeg_marker_reader*, %struct.jpeg_entropy_decoder*, %struct.jpeg_inverse_dct*, %struct.jpeg_upsampler*, %struct.jpeg_color_deconverter*, %struct.jpeg_color_quantizer* }
%struct.jpeg_entropy_decoder = type { void (%struct.jpeg_decompress_struct*)*, i32 (%struct.jpeg_decompress_struct*, [64 x i16]**)* }
%struct.jpeg_error_mgr = type { void (%struct.jpeg_common_struct*)*, void (%struct.jpeg_common_struct*, i32)*, void (%struct.jpeg_common_struct*)*, void (%struct.jpeg_common_struct*, i8*)*, void (%struct.jpeg_common_struct*)*, i32, %struct.anon, i32, i32, i8**, i32, i8**, i32, i32 }
%struct.jpeg_input_controller = type { i32 (%struct.jpeg_decompress_struct*)*, void (%struct.jpeg_decompress_struct*)*, void (%struct.jpeg_decompress_struct*)*, void (%struct.jpeg_decompress_struct*)*, i32, i32 }
%struct.jpeg_inverse_dct = type { void (%struct.jpeg_decompress_struct*)*, [10 x void (%struct.jpeg_decompress_struct*, %struct.jpeg_component_info*, i16*, i8**, i32)*] }
%struct.jpeg_marker_reader = type { void (%struct.jpeg_decompress_struct*)*, i32 (%struct.jpeg_decompress_struct*)*, i32 (%struct.jpeg_decompress_struct*)*, i32 (%struct.jpeg_decompress_struct*)*, [16 x i32 (%struct.jpeg_decompress_struct*)*], i32, i32, i32, i32 }
%struct.jpeg_memory_mgr = type { i8* (%struct.jpeg_common_struct*, i32, i32)*, i8* (%struct.jpeg_common_struct*, i32, i32)*, i8** (%struct.jpeg_common_struct*, i32, i32, i32)*, [64 x i16]** (%struct.jpeg_common_struct*, i32, i32, i32)*, %struct.jvirt_sarray_control* (%struct.jpeg_common_struct*, i32, i32, i32, i32, i32)*, %struct.jvirt_barray_control* (%struct.jpeg_common_struct*, i32, i32, i32, i32, i32)*, void (%struct.jpeg_common_struct*)*, i8** (%struct.jpeg_common_struct*, %struct.jvirt_sarray_control*, i32, i32, i32)*, [64 x i16]** (%struct.jpeg_common_struct*, %struct.jvirt_barray_control*, i32, i32, i32)*, void (%struct.jpeg_common_struct*, i32)*, void (%struct.jpeg_common_struct*)*, i32 }
%struct.jpeg_progress_mgr = type { void (%struct.jpeg_common_struct*)*, i32, i32, i32, i32 }
%struct.jpeg_source_mgr = type { i8*, i32, void (%struct.jpeg_decompress_struct*)*, i32 (%struct.jpeg_decompress_struct*)*, void (%struct.jpeg_decompress_struct*, i32)*, i32 (%struct.jpeg_decompress_struct*, i32)*, void (%struct.jpeg_decompress_struct*)* }
%struct.jpeg_upsampler = type { void (%struct.jpeg_decompress_struct*)*, void (%struct.jpeg_decompress_struct*, i8***, i32*, i32, i8**, i32*, i32)*, i32 }
%struct.jvirt_barray_control = type { [64 x i16]**, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, %struct.jvirt_barray_control*, %struct.backing_store_info }
%struct.jvirt_sarray_control = type { i8**, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, %struct.jvirt_sarray_control*, %struct.backing_store_info }
define void @jpeg_idct_float(%struct.jpeg_decompress_struct* nocapture %cinfo, %struct.jpeg_component_info* nocapture %compptr, i16* nocapture %coef_block, i8** nocapture %output_buf, i32 %output_col) nounwind {
entry:
br label %bb
bb: ; preds = %bb, %entry
%0 = load float, float* undef, align 4 ; <float> [#uses=1]
%1 = fmul float undef, %0 ; <float> [#uses=2]
%tmp73 = add i32 0, 224 ; <i32> [#uses=1]
%scevgep74 = getelementptr i8, i8* null, i32 %tmp73 ; <i8*> [#uses=1]
%scevgep7475 = bitcast i8* %scevgep74 to float* ; <float*> [#uses=1]
%2 = load float, float* null, align 4 ; <float> [#uses=1]
%3 = fmul float 0.000000e+00, %2 ; <float> [#uses=2]
%4 = fadd float %1, %3 ; <float> [#uses=1]
%5 = fsub float %1, %3 ; <float> [#uses=2]
%6 = fadd float undef, 0.000000e+00 ; <float> [#uses=2]
%7 = fmul float undef, 0x3FF6A09E60000000 ; <float> [#uses=1]
%8 = fsub float %7, %6 ; <float> [#uses=2]
%9 = fsub float %4, %6 ; <float> [#uses=1]
%10 = fadd float %5, %8 ; <float> [#uses=2]
%11 = fsub float %5, %8 ; <float> [#uses=1]
%12 = sitofp i16 undef to float ; <float> [#uses=1]
%13 = fmul float %12, 0.000000e+00 ; <float> [#uses=2]
%14 = sitofp i16 undef to float ; <float> [#uses=1]
%15 = load float, float* %scevgep7475, align 4 ; <float> [#uses=1]
%16 = fmul float %14, %15 ; <float> [#uses=2]
%17 = fadd float undef, undef ; <float> [#uses=2]
%18 = fadd float %13, %16 ; <float> [#uses=2]
%19 = fsub float %13, %16 ; <float> [#uses=1]
%20 = fadd float %18, %17 ; <float> [#uses=2]
%21 = fsub float %18, %17 ; <float> [#uses=1]
%22 = fmul float %21, 0x3FF6A09E60000000 ; <float> [#uses=1]
%23 = fmul float undef, 0x3FFD906BC0000000 ; <float> [#uses=2]
%24 = fmul float %19, 0x3FF1517A80000000 ; <float> [#uses=1]
%25 = fsub float %24, %23 ; <float> [#uses=1]
%26 = fadd float undef, %23 ; <float> [#uses=1]
%27 = fsub float %26, %20 ; <float> [#uses=3]
%28 = fsub float %22, %27 ; <float> [#uses=2]
%29 = fadd float %25, %28 ; <float> [#uses=1]
%30 = fadd float undef, %20 ; <float> [#uses=1]
store float %30, float* undef, align 4
%31 = fadd float %10, %27 ; <float> [#uses=1]
store float %31, float* undef, align 4
%32 = fsub float %10, %27 ; <float> [#uses=1]
store float %32, float* undef, align 4
%33 = fadd float %11, %28 ; <float> [#uses=1]
store float %33, float* undef, align 4
%34 = fsub float %9, %29 ; <float> [#uses=1]
store float %34, float* undef, align 4
br label %bb
}

View File

@ -0,0 +1,20 @@
; RUN: llc < %s -mtriple=armv7-eabi -mattr=+vfp2
; PR4686
@g_d = external global double ; <double*> [#uses=1]
define void @foo(float %yIncr) {
entry:
br i1 undef, label %bb, label %bb4
bb: ; preds = %entry
%0 = call arm_aapcs_vfpcc float @bar() ; <float> [#uses=1]
%1 = fpext float %0 to double ; <double> [#uses=1]
store double %1, double* @g_d, align 8
br label %bb4
bb4: ; preds = %bb, %entry
unreachable
}
declare arm_aapcs_vfpcc float @bar()

View File

@ -0,0 +1,15 @@
; RUN: llc < %s -mtriple=thumbv7-apple-darwin -mattr=+vfp2
define float @t1(i32 %v0) nounwind {
entry:
store i32 undef, i32* undef, align 4
%0 = load [4 x i8]*, [4 x i8]** undef, align 4 ; <[4 x i8]*> [#uses=1]
%1 = load i8, i8* undef, align 1 ; <i8> [#uses=1]
%2 = zext i8 %1 to i32 ; <i32> [#uses=1]
%3 = getelementptr [4 x i8], [4 x i8]* %0, i32 %v0, i32 0 ; <i8*> [#uses=1]
%4 = load i8, i8* %3, align 1 ; <i8> [#uses=1]
%5 = zext i8 %4 to i32 ; <i32> [#uses=1]
%6 = sub i32 %5, %2 ; <i32> [#uses=1]
%7 = sitofp i32 %6 to float ; <float> [#uses=1]
ret float %7
}

View File

@ -0,0 +1,26 @@
; RUN: llc < %s -asm-verbose=false -O3 -relocation-model=pic -disable-fp-elim -mtriple=thumbv7-apple-darwin -mcpu=cortex-a8 -post-RA-scheduler
; ModuleID = '<stdin>'
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:32-f32:32:32-f64:32:32-v64:64:64-v128:128:128-a0:0:64"
target triple = "armv7-apple-darwin9"
@.str = external constant [36 x i8], align 1 ; <[36 x i8]*> [#uses=0]
@.str1 = external constant [31 x i8], align 1 ; <[31 x i8]*> [#uses=1]
@.str2 = external constant [4 x i8], align 1 ; <[4 x i8]*> [#uses=1]
declare i32 @getUnknown(i32, ...) nounwind
declare void @llvm.va_start(i8*) nounwind
declare void @llvm.va_end(i8*) nounwind
declare i32 @printf(i8* nocapture, ...) nounwind
define i32 @main() nounwind {
entry:
%0 = tail call i32 (i8*, ...) @printf(i8* getelementptr ([31 x i8], [31 x i8]* @.str1, i32 0, i32 0), i32 1, i32 1, i32 1, i32 1, i32 1, i32 1) nounwind ; <i32> [#uses=0]
%1 = tail call i32 (i8*, ...) @printf(i8* getelementptr ([31 x i8], [31 x i8]* @.str1, i32 0, i32 0), i32 -128, i32 116, i32 116, i32 -3852, i32 -31232, i32 -1708916736) nounwind ; <i32> [#uses=0]
%2 = tail call i32 (i32, ...) @getUnknown(i32 undef, i32 116, i32 116, i32 -3852, i32 -31232, i32 30556, i32 -1708916736) nounwind ; <i32> [#uses=1]
%3 = tail call i32 (i8*, ...) @printf(i8* getelementptr ([4 x i8], [4 x i8]* @.str2, i32 0, i32 0), i32 %2) nounwind ; <i32> [#uses=0]
ret i32 0
}

View File

@ -0,0 +1,104 @@
; RUN: llc -asm-verbose=false -O3 -relocation-model=pic -disable-fp-elim -mtriple=thumbv7-apple-darwin -mcpu=cortex-a8 < %s | FileCheck %s
target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:32-f32:32:32-f64:32:32-v64:64:64-v128:128:128-a0:0:32"
target triple = "thumbv7-apple-darwin9"
@history = internal global [2 x [56 x i32]] [[56 x i32] [i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 0, i32 1, i32 2, i32 4, i32 2, i32 1, i32 0, i32 -1, i32 1, i32 3, i32 5, i32 7, i32 5, i32 3, i32 1, i32 -1, i32 2, i32 5, i32 8, i32 10, i32 8, i32 5, i32 2, i32 -1, i32 2, i32 5, i32 8, i32 10, i32 8, i32 5, i32 2, i32 -1, i32 1, i32 3, i32 5, i32 7, i32 5, i32 3, i32 1, i32 -1, i32 0, i32 1, i32 2, i32 4, i32 2, i32 1, i32 0], [56 x i32] [i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 0, i32 1, i32 2, i32 4, i32 2, i32 1, i32 0, i32 -1, i32 1, i32 3, i32 5, i32 7, i32 5, i32 3, i32 1, i32 -1, i32 2, i32 5, i32 8, i32 10, i32 8, i32 5, i32 2, i32 -1, i32 2, i32 5, i32 8, i32 10, i32 8, i32 5, i32 2, i32 -1, i32 1, i32 3, i32 5, i32 7, i32 5, i32 3, i32 1, i32 -1, i32 0, i32 1, i32 2, i32 4, i32 2, i32 1, i32 0]] ; <[2 x [56 x i32]]*> [#uses=3]
@nodes = internal global i64 0 ; <i64*> [#uses=4]
@.str = private constant [9 x i8] c"##-<=>+#\00", align 1 ; <[9 x i8]*> [#uses=2]
@.str1 = private constant [6 x i8] c"%c%d\0A\00", align 1 ; <[6 x i8]*> [#uses=1]
@.str2 = private constant [16 x i8] c"Fhourstones 2.0\00", align 1 ; <[16 x i8]*> [#uses=1]
@.str3 = private constant [54 x i8] c"Using %d transposition table entries with %d probes.\0A\00", align 1 ; <[54 x i8]*> [#uses=1]
@.str4 = private constant [31 x i8] c"Solving %d-ply position after \00", align 1 ; <[31 x i8]*> [#uses=1]
@.str5 = private constant [7 x i8] c" . . .\00", align 1 ; <[7 x i8]*> [#uses=1]
@.str6 = private constant [28 x i8] c"score = %d (%c) work = %d\0A\00", align 1 ; <[28 x i8]*> [#uses=1]
@.str7 = private constant [36 x i8] c"%lu pos / %lu msec = %.1f Kpos/sec\0A\00", align 1 ; <[36 x i8]*> [#uses=1]
@plycnt = internal global i32 0 ; <i32*> [#uses=21]
@dias = internal global [19 x i32] zeroinitializer ; <[19 x i32]*> [#uses=43]
@columns = internal global [128 x i32] zeroinitializer ; <[128 x i32]*> [#uses=18]
@height = internal global [128 x i32] zeroinitializer ; <[128 x i32]*> [#uses=21]
@rows = internal global [8 x i32] zeroinitializer ; <[8 x i32]*> [#uses=20]
@colthr = internal global [128 x i32] zeroinitializer ; <[128 x i32]*> [#uses=5]
@moves = internal global [44 x i32] zeroinitializer ; <[44 x i32]*> [#uses=9]
@.str8 = private constant [3 x i8] c"%d\00", align 1 ; <[3 x i8]*> [#uses=1]
@he = internal global i8* null ; <i8**> [#uses=9]
@hits = internal global i64 0 ; <i64*> [#uses=8]
@posed = internal global i64 0 ; <i64*> [#uses=7]
@ht = internal global i32* null ; <i32**> [#uses=5]
@.str16 = private constant [19 x i8] c"store rate = %.3f\0A\00", align 1 ; <[19 x i8]*> [#uses=1]
@.str117 = private constant [45 x i8] c"- %5.3f < %5.3f = %5.3f > %5.3f + %5.3f\0A\00", align 1 ; <[45 x i8]*> [#uses=1]
@.str218 = private constant [6 x i8] c"%7d%c\00", align 1 ; <[6 x i8]*> [#uses=1]
@.str319 = private constant [30 x i8] c"Failed to allocate %u bytes.\0A\00", align 1 ; <[30 x i8]*> [#uses=1]
declare i32 @puts(i8* nocapture) nounwind
declare i32 @getchar() nounwind
define internal i32 @transpose() nounwind readonly {
; CHECK: push
entry:
%0 = load i32, i32* getelementptr inbounds ([128 x i32], [128 x i32]* @columns, i32 0, i32 1), align 4 ; <i32> [#uses=1]
%1 = shl i32 %0, 7 ; <i32> [#uses=1]
%2 = load i32, i32* getelementptr inbounds ([128 x i32], [128 x i32]* @columns, i32 0, i32 2), align 4 ; <i32> [#uses=1]
%3 = or i32 %1, %2 ; <i32> [#uses=1]
%4 = shl i32 %3, 7 ; <i32> [#uses=1]
%5 = load i32, i32* getelementptr inbounds ([128 x i32], [128 x i32]* @columns, i32 0, i32 3), align 4 ; <i32> [#uses=1]
%6 = or i32 %4, %5 ; <i32> [#uses=3]
%7 = load i32, i32* getelementptr inbounds ([128 x i32], [128 x i32]* @columns, i32 0, i32 7), align 4 ; <i32> [#uses=1]
%8 = shl i32 %7, 7 ; <i32> [#uses=1]
%9 = load i32, i32* getelementptr inbounds ([128 x i32], [128 x i32]* @columns, i32 0, i32 6), align 4 ; <i32> [#uses=1]
%10 = or i32 %8, %9 ; <i32> [#uses=1]
%11 = shl i32 %10, 7 ; <i32> [#uses=1]
%12 = load i32, i32* getelementptr inbounds ([128 x i32], [128 x i32]* @columns, i32 0, i32 5), align 4 ; <i32> [#uses=1]
%13 = or i32 %11, %12 ; <i32> [#uses=3]
%14 = icmp ugt i32 %6, %13 ; <i1> [#uses=2]
%.pn2.in.i = select i1 %14, i32 %6, i32 %13 ; <i32> [#uses=1]
%.pn1.in.i = select i1 %14, i32 %13, i32 %6 ; <i32> [#uses=1]
%.pn2.i = shl i32 %.pn2.in.i, 7 ; <i32> [#uses=1]
%.pn3.i = load i32, i32* getelementptr inbounds ([128 x i32], [128 x i32]* @columns, i32 0, i32 4) ; <i32> [#uses=1]
%.pn.in.in.i = or i32 %.pn2.i, %.pn3.i ; <i32> [#uses=1]
%.pn.in.i = zext i32 %.pn.in.in.i to i64 ; <i64> [#uses=1]
%.pn.i = shl i64 %.pn.in.i, 21 ; <i64> [#uses=1]
%.pn1.i = zext i32 %.pn1.in.i to i64 ; <i64> [#uses=1]
%iftmp.22.0.i = or i64 %.pn.i, %.pn1.i ; <i64> [#uses=2]
%15 = lshr i64 %iftmp.22.0.i, 17 ; <i64> [#uses=1]
%16 = trunc i64 %15 to i32 ; <i32> [#uses=2]
%17 = urem i64 %iftmp.22.0.i, 1050011 ; <i64> [#uses=1]
%18 = trunc i64 %17 to i32 ; <i32> [#uses=1]
%19 = urem i32 %16, 179 ; <i32> [#uses=1]
%20 = or i32 %19, 131072 ; <i32> [#uses=1]
%21 = load i32*, i32** @ht, align 4 ; <i32*> [#uses=1]
br label %bb5
bb: ; preds = %bb5
%22 = getelementptr inbounds i32, i32* %21, i32 %x.0 ; <i32*> [#uses=1]
%23 = load i32, i32* %22, align 4 ; <i32> [#uses=1]
%24 = icmp eq i32 %23, %16 ; <i1> [#uses=1]
br i1 %24, label %bb1, label %bb2
bb1: ; preds = %bb
%25 = load i8*, i8** @he, align 4 ; <i8*> [#uses=1]
%26 = getelementptr inbounds i8, i8* %25, i32 %x.0 ; <i8*> [#uses=1]
%27 = load i8, i8* %26, align 1 ; <i8> [#uses=1]
%28 = sext i8 %27 to i32 ; <i32> [#uses=1]
ret i32 %28
bb2: ; preds = %bb
%29 = add nsw i32 %20, %x.0 ; <i32> [#uses=3]
%30 = add i32 %29, -1050011 ; <i32> [#uses=1]
%31 = icmp sgt i32 %29, 1050010 ; <i1> [#uses=1]
%. = select i1 %31, i32 %30, i32 %29 ; <i32> [#uses=1]
%32 = add i32 %33, 1 ; <i32> [#uses=1]
br label %bb5
bb5: ; preds = %bb2, %entry
%33 = phi i32 [ 0, %entry ], [ %32, %bb2 ] ; <i32> [#uses=2]
%x.0 = phi i32 [ %18, %entry ], [ %., %bb2 ] ; <i32> [#uses=3]
%34 = icmp sgt i32 %33, 7 ; <i1> [#uses=1]
br i1 %34, label %bb7, label %bb
bb7: ; preds = %bb5
ret i32 -128
}
declare noalias i8* @calloc(i32, i32) nounwind

View File

@ -0,0 +1,42 @@
; RUN: llc < %s -mtriple=thumbv7-eabi -mcpu=cortex-a8 -float-abi=hard | FileCheck %s
; RUN: llc < %s -mtriple=thumbv7-eabi -mcpu=cortex-a8 -float-abi=hard -regalloc=basic | FileCheck %s
; PR5204
%"struct.__gnu_cxx::__normal_iterator<char*,std::basic_string<char, std::char_traits<char>, std::allocator<char> > >" = type { i8* }
%"struct.__gnu_cxx::new_allocator<char>" = type <{ i8 }>
%"struct.std::basic_string<char,std::char_traits<char>,std::allocator<char> >" = type { %"struct.__gnu_cxx::__normal_iterator<char*,std::basic_string<char, std::char_traits<char>, std::allocator<char> > >" }
%"struct.std::basic_string<char,std::char_traits<char>,std::allocator<char> >::_Rep" = type { %"struct.std::basic_string<char,std::char_traits<char>,std::allocator<char> >::_Rep_base" }
%"struct.std::basic_string<char,std::char_traits<char>,std::allocator<char> >::_Rep_base" = type { i32, i32, i32 }
define weak arm_aapcs_vfpcc i32 @_ZNKSs7compareERKSs(%"struct.std::basic_string<char,std::char_traits<char>,std::allocator<char> >"* %this, %"struct.std::basic_string<char,std::char_traits<char>,std::allocator<char> >"* %__str) {
; CHECK-LABEL: _ZNKSs7compareERKSs:
; CHECK: it eq
; CHECK-NEXT: subeq{{(.w)?}} r0, r{{[0-9]+}}, r{{[0-9]+}}
; CHECK-NEXT: pop.w
entry:
%0 = tail call arm_aapcs_vfpcc i32 @_ZNKSs4sizeEv(%"struct.std::basic_string<char,std::char_traits<char>,std::allocator<char> >"* %this) ; <i32> [#uses=3]
%1 = tail call arm_aapcs_vfpcc i32 @_ZNKSs4sizeEv(%"struct.std::basic_string<char,std::char_traits<char>,std::allocator<char> >"* %__str) ; <i32> [#uses=3]
%2 = icmp ult i32 %1, %0 ; <i1> [#uses=1]
%3 = select i1 %2, i32 %1, i32 %0 ; <i32> [#uses=1]
%4 = tail call arm_aapcs_vfpcc i8* @_ZNKSs7_M_dataEv(%"struct.std::basic_string<char,std::char_traits<char>,std::allocator<char> >"* %this) ; <i8*> [#uses=1]
%5 = tail call arm_aapcs_vfpcc i8* @_ZNKSs4dataEv(%"struct.std::basic_string<char,std::char_traits<char>,std::allocator<char> >"* %__str) ; <i8*> [#uses=1]
%6 = tail call arm_aapcs_vfpcc i32 @memcmp(i8* %4, i8* %5, i32 %3) nounwind readonly ; <i32> [#uses=2]
%7 = icmp eq i32 %6, 0 ; <i1> [#uses=1]
br i1 %7, label %bb, label %bb1
bb: ; preds = %entry
%8 = sub i32 %0, %1 ; <i32> [#uses=1]
ret i32 %8
bb1: ; preds = %entry
ret i32 %6
}
declare arm_aapcs_vfpcc i32 @memcmp(i8* nocapture, i8* nocapture, i32) nounwind readonly
declare arm_aapcs_vfpcc i32 @_ZNKSs4sizeEv(%"struct.std::basic_string<char,std::char_traits<char>,std::allocator<char> >"* %this)
declare arm_aapcs_vfpcc i8* @_ZNKSs7_M_dataEv(%"struct.std::basic_string<char,std::char_traits<char>,std::allocator<char> >"* %this)
declare arm_aapcs_vfpcc i8* @_ZNKSs4dataEv(%"struct.std::basic_string<char,std::char_traits<char>,std::allocator<char> >"* %this)

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