diff --git a/llvm/test/CodeGen/Thumb2/2009-07-17-CrossRegClassCopy.ll b/llvm/test/CodeGen/Thumb2/2009-07-17-CrossRegClassCopy.ll index f76c8ff4d0f8e2..d9f72daf54bf2d 100644 --- a/llvm/test/CodeGen/Thumb2/2009-07-17-CrossRegClassCopy.ll +++ b/llvm/test/CodeGen/Thumb2/2009-07-17-CrossRegClassCopy.ll @@ -4,9 +4,9 @@ target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32: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 +declare ptr @read_sleb128(ptr, ptr nocapture) nounwind -define i32 @get_cie_encoding(%struct.dwarf_cie* %cie) nounwind { +define i32 @get_cie_encoding(ptr %cie) nounwind { entry: br i1 undef, label %bb1, label %bb13 @@ -17,8 +17,8 @@ bb1: ; preds = %entry bb.i: ; preds = %bb.i, %bb1 %indvar.i = phi i32 [ 0, %bb1 ], [ %2, %bb.i ] ; [#uses=3] %tmp39 = add i32 %indvar.i, %tmp38 ; [#uses=1] - %p_addr.0.i = getelementptr i8, i8* undef, i32 %tmp39 ; [#uses=1] - %0 = load i8, i8* %p_addr.0.i, align 1 ; [#uses=1] + %p_addr.0.i = getelementptr i8, ptr undef, i32 %tmp39 ; [#uses=1] + %0 = load i8, ptr %p_addr.0.i, align 1 ; [#uses=1] %1 = icmp slt i8 %0, 0 ; [#uses=1] %2 = add i32 %indvar.i, 1 ; [#uses=1] br i1 %1, label %bb.i, label %read_uleb128.exit @@ -26,8 +26,8 @@ bb.i: ; preds = %bb.i, %bb1 read_uleb128.exit: ; preds = %bb.i %.sum40 = add i32 %indvar.i, undef ; [#uses=1] %.sum31 = add i32 %.sum40, 2 ; [#uses=1] - %scevgep.i = getelementptr %struct.dwarf_cie, %struct.dwarf_cie* %cie, i32 0, i32 3, i32 %.sum31 ; [#uses=1] - %3 = call i8* @read_sleb128(i8* %scevgep.i, i32* undef) ; [#uses=0] + %scevgep.i = getelementptr %struct.dwarf_cie, ptr %cie, i32 0, i32 3, i32 %.sum31 ; [#uses=1] + %3 = call ptr @read_sleb128(ptr %scevgep.i, ptr undef) ; [#uses=0] unreachable bb13: ; preds = %entry diff --git a/llvm/test/CodeGen/Thumb2/2009-07-21-ISelBug.ll b/llvm/test/CodeGen/Thumb2/2009-07-21-ISelBug.ll index 1d5d038663a5c2..62f324cd41f103 100644 --- a/llvm/test/CodeGen/Thumb2/2009-07-21-ISelBug.ll +++ b/llvm/test/CodeGen/Thumb2/2009-07-21-ISelBug.ll @@ -1,36 +1,33 @@ ; 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] +@"\01LC" = external constant [36 x i8], align 1 ; [#uses=1] define i32 @t(i32, ...) nounwind "frame-pointer"="all" { entry: ; CHECK-LABEL: t: ; CHECK: add r7, sp, #12 - %1 = load i8*, i8** undef, align 4 ; [#uses=3] - %2 = getelementptr i8, i8* %1, i32 4 ; [#uses=1] - %3 = getelementptr i8, i8* %1, i32 8 ; [#uses=1] - %4 = bitcast i8* %2 to i32* ; [#uses=1] - %5 = load i32, i32* %4, align 4 ; [#uses=1] - %6 = trunc i32 %5 to i8 ; [#uses=1] - %7 = getelementptr i8, i8* %1, i32 12 ; [#uses=1] - %8 = bitcast i8* %3 to i32* ; [#uses=1] - %9 = load i32, i32* %8, align 4 ; [#uses=1] + %1 = load ptr, ptr undef, align 4 ; [#uses=3] + %2 = getelementptr i8, ptr %1, i32 4 ; [#uses=1] + %3 = getelementptr i8, ptr %1, i32 8 ; [#uses=1] + %4 = load i32, ptr %2, align 4 ; [#uses=1] + %5 = trunc i32 %4 to i8 ; [#uses=1] + %6 = getelementptr i8, ptr %1, i32 12 ; [#uses=1] + %7 = load i32, ptr %3, align 4 ; [#uses=1] + %8 = trunc i32 %7 to i16 ; [#uses=1] + %9 = load i32, ptr %6, align 4 ; [#uses=1] %10 = trunc i32 %9 to i16 ; [#uses=1] - %11 = bitcast i8* %7 to i32* ; [#uses=1] - %12 = load i32, i32* %11, align 4 ; [#uses=1] - %13 = trunc i32 %12 to i16 ; [#uses=1] - %14 = load i32, i32* undef, align 4 ; [#uses=2] - %15 = sext i8 %6 to i32 ; [#uses=2] - %16 = sext i16 %10 to i32 ; [#uses=2] - %17 = sext i16 %13 to 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 ; [#uses=0] - %19 = add i32 0, %15 ; [#uses=1] - %20 = add i32 %19, %16 ; [#uses=1] - %21 = add i32 %20, %14 ; [#uses=1] - %22 = add i32 %21, %17 ; [#uses=1] - %23 = add i32 %22, 0 ; [#uses=1] - ret i32 %23 + %11 = load i32, ptr undef, align 4 ; [#uses=2] + %12 = sext i8 %5 to i32 ; [#uses=2] + %13 = sext i16 %8 to i32 ; [#uses=2] + %14 = sext i16 %10 to i32 ; [#uses=2] + %15 = call i32 (ptr, ...) @printf(ptr @"\01LC", i32 -128, i32 0, i32 %12, i32 %13, i32 %14, i32 0, i32 %11) nounwind ; [#uses=0] + %16 = add i32 0, %12 ; [#uses=1] + %17 = add i32 %16, %13 ; [#uses=1] + %18 = add i32 %17, %11 ; [#uses=1] + %19 = add i32 %18, %14 ; [#uses=1] + %20 = add i32 %19, 0 ; [#uses=1] + ret i32 %20 } -declare i32 @printf(i8* nocapture, ...) nounwind +declare i32 @printf(ptr nocapture, ...) nounwind diff --git a/llvm/test/CodeGen/Thumb2/2009-07-30-PEICrash.ll b/llvm/test/CodeGen/Thumb2/2009-07-30-PEICrash.ll index 1b4dbb326194be..8b1d29c82289d4 100644 --- a/llvm/test/CodeGen/Thumb2/2009-07-30-PEICrash.ll +++ b/llvm/test/CodeGen/Thumb2/2009-07-30-PEICrash.ll @@ -1,65 +1,64 @@ ; RUN: llc < %s -mtriple=thumbv7-apple-darwin9 -mcpu=cortex-a8 -relocation-model=pic -frame-pointer=all - %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 = type { ptr, i32, i32, i16, i16, %struct.__sbuf, i32, ptr, ptr, ptr, ptr, ptr, %struct.__sbuf, ptr, 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.__sbuf = type { ptr, 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 } + %struct.backing_store_info = type { ptr, ptr, ptr, ptr, [64 x i8] } + %struct.jpeg_color_deconverter = type { ptr, ptr } + %struct.jpeg_color_quantizer = type { ptr, ptr, ptr, ptr } + %struct.jpeg_common_struct = type { ptr, ptr, ptr, 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, ptr, ptr } + %struct.jpeg_d_coef_controller = type { ptr, ptr, ptr, ptr, ptr } + %struct.jpeg_d_main_controller = type { ptr, ptr } + %struct.jpeg_d_post_controller = type { ptr, ptr } + %struct.jpeg_decomp_master = type { ptr, ptr, i32 } + %struct.jpeg_decompress_struct = type { ptr, ptr, ptr, i32, i32, ptr, 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, ptr, i32, i32, i32, i32, i32, ptr, [4 x ptr], [4 x ptr], [4 x ptr], i32, ptr, i32, i32, [16 x i8], [16 x i8], [16 x i8], i32, i32, i8, i16, i16, i32, i8, i32, i32, i32, i32, i32, ptr, i32, [4 x ptr], i32, i32, i32, [10 x i32], i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr } + %struct.jpeg_entropy_decoder = type { ptr, ptr } + %struct.jpeg_error_mgr = type { ptr, ptr, ptr, ptr, ptr, i32, %struct.anon, i32, i32, ptr, i32, ptr, i32, i32 } + %struct.jpeg_input_controller = type { ptr, ptr, ptr, ptr, i32, i32 } + %struct.jpeg_inverse_dct = type { ptr, [10 x ptr] } + %struct.jpeg_marker_reader = type { ptr, ptr, ptr, ptr, [16 x ptr], i32, i32, i32, i32 } + %struct.jpeg_memory_mgr = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32 } + %struct.jpeg_progress_mgr = type { ptr, i32, i32, i32, i32 } + %struct.jpeg_source_mgr = type { ptr, i32, ptr, ptr, ptr, ptr, ptr } + %struct.jpeg_upsampler = type { ptr, ptr, i32 } + %struct.jvirt_barray_control = type { ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, %struct.backing_store_info } + %struct.jvirt_sarray_control = type { ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, %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 { +define void @jpeg_idct_float(ptr nocapture %cinfo, ptr nocapture %compptr, ptr nocapture %coef_block, ptr 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 ; [#uses=5] + %workspace = alloca [64 x float], align 4 ; [#uses=11] + %0 = load ptr, ptr undef, align 4 ; [#uses=5] br label %bb bb: ; preds = %bb, %entry %indvar = phi i32 [ 0, %entry ], [ %indvar.next, %bb ] ; [#uses=11] %tmp39 = add i32 %indvar, 8 ; [#uses=0] %tmp41 = add i32 %indvar, 16 ; [#uses=2] - %scevgep42 = getelementptr [64 x float], [64 x float]* %workspace, i32 0, i32 %tmp41 ; [#uses=1] + %scevgep42 = getelementptr [64 x float], ptr %workspace, i32 0, i32 %tmp41 ; [#uses=1] %tmp43 = add i32 %indvar, 24 ; [#uses=1] - %scevgep44 = getelementptr [64 x float], [64 x float]* %workspace, i32 0, i32 %tmp43 ; [#uses=1] + %scevgep44 = getelementptr [64 x float], ptr %workspace, i32 0, i32 %tmp43 ; [#uses=1] %tmp45 = add i32 %indvar, 32 ; [#uses=1] - %scevgep46 = getelementptr [64 x float], [64 x float]* %workspace, i32 0, i32 %tmp45 ; [#uses=1] + %scevgep46 = getelementptr [64 x float], ptr %workspace, i32 0, i32 %tmp45 ; [#uses=1] %tmp47 = add i32 %indvar, 40 ; [#uses=1] - %scevgep48 = getelementptr [64 x float], [64 x float]* %workspace, i32 0, i32 %tmp47 ; [#uses=1] + %scevgep48 = getelementptr [64 x float], ptr %workspace, i32 0, i32 %tmp47 ; [#uses=1] %tmp49 = add i32 %indvar, 48 ; [#uses=1] - %scevgep50 = getelementptr [64 x float], [64 x float]* %workspace, i32 0, i32 %tmp49 ; [#uses=1] + %scevgep50 = getelementptr [64 x float], ptr %workspace, i32 0, i32 %tmp49 ; [#uses=1] %tmp51 = add i32 %indvar, 56 ; [#uses=1] - %scevgep52 = getelementptr [64 x float], [64 x float]* %workspace, i32 0, i32 %tmp51 ; [#uses=1] - %wsptr.119 = getelementptr [64 x float], [64 x float]* %workspace, i32 0, i32 %indvar ; [#uses=1] + %scevgep52 = getelementptr [64 x float], ptr %workspace, i32 0, i32 %tmp51 ; [#uses=1] + %wsptr.119 = getelementptr [64 x float], ptr %workspace, i32 0, i32 %indvar ; [#uses=1] %tmp54 = shl i32 %indvar, 2 ; [#uses=1] - %scevgep76 = getelementptr i8, i8* undef, i32 %tmp54 ; [#uses=1] - %quantptr.118 = bitcast i8* %scevgep76 to float* ; [#uses=1] - %scevgep79 = getelementptr i16, i16* %coef_block, i32 %tmp41 ; [#uses=0] - %inptr.117 = getelementptr i16, i16* %coef_block, i32 %indvar ; [#uses=1] - %1 = load i16, i16* null, align 2 ; [#uses=1] - %2 = load i16, i16* undef, align 2 ; [#uses=1] - %3 = load i16, i16* %inptr.117, align 2 ; [#uses=1] + %scevgep76 = getelementptr i8, ptr undef, i32 %tmp54 ; [#uses=1] + %scevgep79 = getelementptr i16, ptr %coef_block, i32 %tmp41 ; [#uses=0] + %inptr.117 = getelementptr i16, ptr %coef_block, i32 %indvar ; [#uses=1] + %1 = load i16, ptr null, align 2 ; [#uses=1] + %2 = load i16, ptr undef, align 2 ; [#uses=1] + %3 = load i16, ptr %inptr.117, align 2 ; [#uses=1] %4 = sitofp i16 %3 to float ; [#uses=1] - %5 = load float, float* %quantptr.118, align 4 ; [#uses=1] + %5 = load float, ptr %scevgep76, align 4 ; [#uses=1] %6 = fmul float %4, %5 ; [#uses=1] %7 = fsub float %6, undef ; [#uses=2] %8 = fmul float undef, 0x3FF6A09E60000000 ; [#uses=1] @@ -70,7 +69,7 @@ bb: ; preds = %bb, %entry %13 = sitofp i16 %1 to float ; [#uses=1] %14 = fmul float %13, undef ; [#uses=2] %15 = sitofp i16 %2 to float ; [#uses=1] - %16 = load float, float* undef, align 4 ; [#uses=1] + %16 = load float, ptr undef, align 4 ; [#uses=1] %17 = fmul float %15, %16 ; [#uses=1] %18 = fadd float %14, undef ; [#uses=2] %19 = fsub float %14, undef ; [#uses=2] @@ -88,20 +87,20 @@ bb: ; preds = %bb, %entry %31 = fsub float %23, %30 ; [#uses=3] %32 = fadd float %27, %31 ; [#uses=1] %33 = fadd float %10, %21 ; [#uses=1] - store float %33, float* %wsptr.119, align 4 + store float %33, ptr %wsptr.119, align 4 %34 = fsub float %10, %21 ; [#uses=1] - store float %34, float* %scevgep52, align 4 + store float %34, ptr %scevgep52, align 4 %35 = fadd float %11, %30 ; [#uses=1] - store float %35, float* null, align 4 + store float %35, ptr null, align 4 %36 = fsub float %11, %30 ; [#uses=1] - store float %36, float* %scevgep50, align 4 + store float %36, ptr %scevgep50, align 4 %37 = fadd float %12, %31 ; [#uses=1] - store float %37, float* %scevgep42, align 4 + store float %37, ptr %scevgep42, align 4 %38 = fsub float %12, %31 ; [#uses=1] - store float %38, float* %scevgep48, align 4 + store float %38, ptr %scevgep48, align 4 %39 = fadd float undef, %32 ; [#uses=1] - store float %39, float* %scevgep46, align 4 - store float undef, float* %scevgep44, align 4 + store float %39, ptr %scevgep46, align 4 + store float undef, ptr %scevgep44, align 4 %indvar.next = add i32 %indvar, 1 ; [#uses=1] br i1 undef, label %bb6, label %bb @@ -114,22 +113,22 @@ bb6: ; preds = %bb bb8: ; preds = %bb8, %bb6 %ctr.116 = phi i32 [ 0, %bb6 ], [ %88, %bb8 ] ; [#uses=3] - %scevgep = getelementptr i8*, i8** %output_buf, i32 %ctr.116 ; [#uses=1] + %scevgep = getelementptr ptr, ptr %output_buf, i32 %ctr.116 ; [#uses=1] %tmp = shl i32 %ctr.116, 3 ; [#uses=5] %tmp2392 = or i32 %tmp, 4 ; [#uses=1] - %scevgep24 = getelementptr [64 x float], [64 x float]* %workspace, i32 0, i32 %tmp2392 ; [#uses=1] + %scevgep24 = getelementptr [64 x float], ptr %workspace, i32 0, i32 %tmp2392 ; [#uses=1] %tmp2591 = or i32 %tmp, 2 ; [#uses=1] - %scevgep26 = getelementptr [64 x float], [64 x float]* %workspace, i32 0, i32 %tmp2591 ; [#uses=1] + %scevgep26 = getelementptr [64 x float], ptr %workspace, i32 0, i32 %tmp2591 ; [#uses=1] %tmp2790 = or i32 %tmp, 6 ; [#uses=1] - %scevgep28 = getelementptr [64 x float], [64 x float]* %workspace, i32 0, i32 %tmp2790 ; [#uses=1] + %scevgep28 = getelementptr [64 x float], ptr %workspace, i32 0, i32 %tmp2790 ; [#uses=1] %tmp3586 = or i32 %tmp, 7 ; [#uses=0] - %wsptr.215 = getelementptr [64 x float], [64 x float]* %workspace, i32 0, i32 %tmp ; [#uses=1] - %40 = load i8*, i8** %scevgep, align 4 ; [#uses=4] - %41 = load float, float* %wsptr.215, align 4 ; [#uses=1] - %42 = load float, float* %scevgep24, align 4 ; [#uses=1] + %wsptr.215 = getelementptr [64 x float], ptr %workspace, i32 0, i32 %tmp ; [#uses=1] + %40 = load ptr, ptr %scevgep, align 4 ; [#uses=4] + %41 = load float, ptr %wsptr.215, align 4 ; [#uses=1] + %42 = load float, ptr %scevgep24, align 4 ; [#uses=1] %43 = fadd float %41, %42 ; [#uses=1] - %44 = load float, float* %scevgep26, align 4 ; [#uses=1] - %45 = load float, float* %scevgep28, align 4 ; [#uses=1] + %44 = load float, ptr %scevgep26, align 4 ; [#uses=1] + %45 = load float, ptr %scevgep28, align 4 ; [#uses=1] %46 = fadd float %44, %45 ; [#uses=1] %47 = fsub float %43, %46 ; [#uses=2] %48 = fsub float undef, 0.000000e+00 ; [#uses=1] @@ -139,51 +138,51 @@ bb8: ; preds = %bb8, %bb6 %52 = lshr i32 %51, 3 ; [#uses=1] %53 = and i32 %52, 1023 ; [#uses=1] %.sum14 = add i32 %53, 128 ; [#uses=1] - %54 = getelementptr i8, i8* %0, i32 %.sum14 ; [#uses=1] - %55 = load i8, i8* %54, align 1 ; [#uses=1] - store i8 %55, i8* null, align 1 - %56 = getelementptr i8, i8* %40, i32 %.sum10 ; [#uses=1] - store i8 0, i8* %56, align 1 - %57 = load i8, i8* null, align 1 ; [#uses=1] - %58 = getelementptr i8, i8* %40, i32 %.sum8 ; [#uses=1] - store i8 %57, i8* %58, align 1 + %54 = getelementptr i8, ptr %0, i32 %.sum14 ; [#uses=1] + %55 = load i8, ptr %54, align 1 ; [#uses=1] + store i8 %55, ptr null, align 1 + %56 = getelementptr i8, ptr %40, i32 %.sum10 ; [#uses=1] + store i8 0, ptr %56, align 1 + %57 = load i8, ptr null, align 1 ; [#uses=1] + %58 = getelementptr i8, ptr %40, i32 %.sum8 ; [#uses=1] + store i8 %57, ptr %58, align 1 %59 = fadd float undef, %48 ; [#uses=1] %60 = fptosi float %59 to i32 ; [#uses=1] %61 = add i32 %60, 4 ; [#uses=1] %62 = lshr i32 %61, 3 ; [#uses=1] %63 = and i32 %62, 1023 ; [#uses=1] %.sum7 = add i32 %63, 128 ; [#uses=1] - %64 = getelementptr i8, i8* %0, i32 %.sum7 ; [#uses=1] - %65 = load i8, i8* %64, align 1 ; [#uses=1] - %66 = getelementptr i8, i8* %40, i32 %.sum6 ; [#uses=1] - store i8 %65, i8* %66, align 1 + %64 = getelementptr i8, ptr %0, i32 %.sum7 ; [#uses=1] + %65 = load i8, ptr %64, align 1 ; [#uses=1] + %66 = getelementptr i8, ptr %40, i32 %.sum6 ; [#uses=1] + store i8 %65, ptr %66, align 1 %67 = fptosi float undef to i32 ; [#uses=1] %68 = add i32 %67, 4 ; [#uses=1] %69 = lshr i32 %68, 3 ; [#uses=1] %70 = and i32 %69, 1023 ; [#uses=1] %.sum5 = add i32 %70, 128 ; [#uses=1] - %71 = getelementptr i8, i8* %0, i32 %.sum5 ; [#uses=1] - %72 = load i8, i8* %71, align 1 ; [#uses=1] - store i8 %72, i8* undef, align 1 + %71 = getelementptr i8, ptr %0, i32 %.sum5 ; [#uses=1] + %72 = load i8, ptr %71, align 1 ; [#uses=1] + store i8 %72, ptr undef, align 1 %73 = fadd float %47, undef ; [#uses=1] %74 = fptosi float %73 to i32 ; [#uses=1] %75 = add i32 %74, 4 ; [#uses=1] %76 = lshr i32 %75, 3 ; [#uses=1] %77 = and i32 %76, 1023 ; [#uses=1] %.sum3 = add i32 %77, 128 ; [#uses=1] - %78 = getelementptr i8, i8* %0, i32 %.sum3 ; [#uses=1] - %79 = load i8, i8* %78, align 1 ; [#uses=1] - store i8 %79, i8* undef, align 1 + %78 = getelementptr i8, ptr %0, i32 %.sum3 ; [#uses=1] + %79 = load i8, ptr %78, align 1 ; [#uses=1] + store i8 %79, ptr undef, align 1 %80 = fsub float %47, undef ; [#uses=1] %81 = fptosi float %80 to i32 ; [#uses=1] %82 = add i32 %81, 4 ; [#uses=1] %83 = lshr i32 %82, 3 ; [#uses=1] %84 = and i32 %83, 1023 ; [#uses=1] %.sum1 = add i32 %84, 128 ; [#uses=1] - %85 = getelementptr i8, i8* %0, i32 %.sum1 ; [#uses=1] - %86 = load i8, i8* %85, align 1 ; [#uses=1] - %87 = getelementptr i8, i8* %40, i32 %.sum ; [#uses=1] - store i8 %86, i8* %87, align 1 + %85 = getelementptr i8, ptr %0, i32 %.sum1 ; [#uses=1] + %86 = load i8, ptr %85, align 1 ; [#uses=1] + %87 = getelementptr i8, ptr %40, i32 %.sum ; [#uses=1] + store i8 %86, ptr %87, align 1 %88 = add i32 %ctr.116, 1 ; [#uses=2] %exitcond = icmp eq i32 %88, 8 ; [#uses=1] br i1 %exitcond, label %return, label %bb8 diff --git a/llvm/test/CodeGen/Thumb2/2009-08-01-WrongLDRBOpc.ll b/llvm/test/CodeGen/Thumb2/2009-08-01-WrongLDRBOpc.ll index 1eafa5b2042c6b..296da07180b5e5 100644 --- a/llvm/test/CodeGen/Thumb2/2009-08-01-WrongLDRBOpc.ll +++ b/llvm/test/CodeGen/Thumb2/2009-08-01-WrongLDRBOpc.ll @@ -1,18 +1,18 @@ ; RUN: llc < %s -mtriple=thumbv7-apple-darwin9 -mcpu=cortex-a8 -relocation-model=pic -frame-pointer=all -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] +@csize = external global [100 x [20 x [4 x i8]]] ; [#uses=1] +@vsize = external global [100 x [20 x [4 x i8]]] ; [#uses=1] +@cll = external global [20 x [10 x i8]] ; [#uses=1] +@lefline = external global [100 x [20 x i32]] ; [#uses=1] +@sep = external global [20 x i32] ; [#uses=1] -define void @main(i32 %argc, i8** %argv) noreturn nounwind { +define void @main(i32 %argc, ptr %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] + %nb.i.i.i = alloca [25 x i8], align 1 ; [#uses=0] + %line.i.i.i = alloca [200 x i8], align 1 ; [#uses=1] + %line.i = alloca [1024 x i8], align 1 ; [#uses=0] br i1 undef, label %bb.i.i, label %bb4.preheader.i bb.i.i: ; preds = %entry @@ -22,7 +22,7 @@ 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 ; [#uses=1] + %line3.i.i.i = getelementptr [200 x i8], ptr %line.i.i.i, i32 0, i32 0 ; [#uses=1] br label %bb.i bb.i: ; preds = %bb4.backedge.i, %bb.i.preheader @@ -38,7 +38,7 @@ 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 ; [#uses=1] + %0 = load i8, ptr %line3.i.i.i, align 1 ; [#uses=1] %1 = icmp eq i8 %0, 59 ; [#uses=1] br i1 %1, label %bb36.i.i.i, label %bb9.i186.i.i @@ -53,19 +53,19 @@ bb36.i.i.i: ; preds = %bb35.preheader.i.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 ] ; [#uses=6] - %scevgep16.i.i.i = getelementptr [20 x i32], [20 x i32]* @sep, i32 0, i32 %2 ; [#uses=1] - %scevgep18.i.i.i = getelementptr [20 x [10 x i8]], [20 x [10 x i8]]* @cll, i32 0, i32 %2, i32 0 ; [#uses=0] - store i32 -1, i32* %scevgep16.i.i.i, align 4 + %scevgep16.i.i.i = getelementptr [20 x i32], ptr @sep, i32 0, i32 %2 ; [#uses=1] + %scevgep18.i.i.i = getelementptr [20 x [10 x i8]], ptr @cll, i32 0, i32 %2, i32 0 ; [#uses=0] + store i32 -1, ptr %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 ] ; [#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 ; [#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 ; [#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 ; [#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 + %scevgep11.i.i.i = getelementptr [100 x [20 x i32]], ptr @lefline, i32 0, i32 %i.03.i172.i.i, i32 %2 ; [#uses=1] + %scevgep12.i.i.i = getelementptr [100 x [20 x [4 x i8]]], ptr @vsize, i32 0, i32 %i.03.i172.i.i, i32 %2, i32 0 ; [#uses=1] + %scevgep13.i.i.i = getelementptr [100 x [20 x [4 x i8]]], ptr @csize, i32 0, i32 %i.03.i172.i.i, i32 %2, i32 0 ; [#uses=0] + store i8 0, ptr %scevgep12.i.i.i, align 1 + store i32 0, ptr %scevgep11.i.i.i, align 4 + store i32 108, ptr undef, align 4 %3 = add i32 %i.03.i172.i.i, 1 ; [#uses=2] %exitcond.i174.i.i = icmp eq i32 %3, 100 ; [#uses=1] br i1 %exitcond.i174.i.i, label %bb3.i176.i.i, label %bb1.i175.i.i diff --git a/llvm/test/CodeGen/Thumb2/2009-08-02-CoalescerBug.ll b/llvm/test/CodeGen/Thumb2/2009-08-02-CoalescerBug.ll index 85d8d5c51d77da..a0c71bc7b58c78 100644 --- a/llvm/test/CodeGen/Thumb2/2009-08-02-CoalescerBug.ll +++ b/llvm/test/CodeGen/Thumb2/2009-08-02-CoalescerBug.ll @@ -1,46 +1,45 @@ ; RUN: llc < %s -mtriple=thumbv7-apple-darwin9 -mcpu=cortex-a8 -relocation-model=pic -frame-pointer=all - %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 + %0 = type { ptr, i32 } ; type %0 + %1 = type { ptr, i32 } ; type %1 + %2 = type { ptr, i32 } ; type %2 + %3 = type { ptr, i32 } ; type %3 + %4 = type { ptr, i32 } ; type %4 %"struct.std::CharVectorType" = type { %"struct.std::_Vector_base >" } %"struct.std::_Bit_const_iterator" = type { %"struct.std::_Bit_iterator_base" } - %"struct.std::_Bit_iterator_base" = type { i32*, i32 } + %"struct.std::_Bit_iterator_base" = type { ptr, i32 } %"struct.std::_Bvector_base >" = type { %"struct.std::_Bvector_base >::_Bvector_impl" } - %"struct.std::_Bvector_base >::_Bvector_impl" = type { %"struct.std::_Bit_const_iterator", %"struct.std::_Bit_const_iterator", i32* } + %"struct.std::_Bvector_base >::_Bvector_impl" = type { %"struct.std::_Bit_const_iterator", %"struct.std::_Bit_const_iterator", ptr } %"struct.std::_Vector_base >" = type { %"struct.std::_Vector_base >::_Vector_impl" } - %"struct.std::_Vector_base >::_Vector_impl" = type { i8*, i8*, i8* } + %"struct.std::_Vector_base >::_Vector_impl" = type { ptr, ptr, ptr } %"struct.std::_Vector_base >" = type { %"struct.std::_Vector_base >::_Vector_impl" } - %"struct.std::_Vector_base >::_Vector_impl" = type { i16*, i16*, i16* } - %"struct.std::basic_ostream >.base" = type { i32 (...)** } + %"struct.std::_Vector_base >::_Vector_impl" = type { ptr, ptr, ptr } + %"struct.std::basic_ostream >.base" = type { ptr } %"struct.std::vector >" = type { %"struct.std::_Bvector_base >" } %"struct.std::vector >" = type { %"struct.std::_Vector_base >" } - %"struct.xalanc_1_8::FormatterListener" = type { %"struct.std::basic_ostream >.base", %"struct.std::basic_ostream >.base"*, i32 } - %"struct.xalanc_1_8::FormatterToXML" = type { %"struct.xalanc_1_8::FormatterListener", %"struct.std::basic_ostream >.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 >", %"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 >", i32, %"struct.std::CharVectorType", %"struct.std::vector >", %0, %1, %2, %3, %0, %1, %2, %3, %4, i16*, i32 } + %"struct.xalanc_1_8::FormatterListener" = type { %"struct.std::basic_ostream >.base", ptr, i32 } + %"struct.xalanc_1_8::FormatterToXML" = type { %"struct.xalanc_1_8::FormatterListener", ptr, ptr, 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 >", %"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 >", i32, %"struct.std::CharVectorType", %"struct.std::vector >", %0, %1, %2, %3, %0, %1, %2, %3, %4, ptr, i32 } %"struct.xalanc_1_8::XalanDOMString" = type { %"struct.std::vector >", i32 } - %"struct.xalanc_1_8::XalanOutputStream" = type { i32 (...)**, i32, %"struct.std::basic_ostream >.base"*, i32, %"struct.std::vector >", %"struct.xalanc_1_8::XalanDOMString", i8, i8, %"struct.std::CharVectorType" } + %"struct.xalanc_1_8::XalanOutputStream" = type { ptr, i32, ptr, i32, %"struct.std::vector >", %"struct.xalanc_1_8::XalanDOMString", i8, i8, %"struct.std::CharVectorType" } -declare void @_ZN10xalanc_1_814FormatterToXML17writeParentTagEndEv(%"struct.xalanc_1_8::FormatterToXML"*) +declare void @_ZN10xalanc_1_814FormatterToXML17writeParentTagEndEv(ptr) -define void @_ZN10xalanc_1_814FormatterToXML5cdataEPKtj(%"struct.xalanc_1_8::FormatterToXML"* %this, i16* %ch, i32 %length) { +define void @_ZN10xalanc_1_814FormatterToXML5cdataEPKtj(ptr %this, ptr %ch, i32 %length) { entry: - %0 = getelementptr %"struct.xalanc_1_8::FormatterToXML", %"struct.xalanc_1_8::FormatterToXML"* %this, i32 0, i32 13 ; [#uses=1] + %0 = getelementptr %"struct.xalanc_1_8::FormatterToXML", ptr %this, i32 0, i32 13 ; [#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 ; [#uses=1] - %2 = load i32 (...)**, i32 (...)*** %1, align 4 ; [#uses=1] - %3 = getelementptr i32 (...)*, i32 (...)** %2, i32 11 ; [#uses=1] - %4 = load i32 (...)*, i32 (...)** %3, align 4 ; [#uses=1] - %5 = bitcast i32 (...)* %4 to void (%"struct.xalanc_1_8::FormatterToXML"*, i16*, i32)* ; [#uses=1] - tail call void %5(%"struct.xalanc_1_8::FormatterToXML"* %this, i16* %ch, i32 %length) + store i8 0, ptr %0, align 1 + %1 = getelementptr %"struct.xalanc_1_8::FormatterToXML", ptr %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1] + %2 = load ptr, ptr %1, align 4 ; [#uses=1] + %3 = getelementptr ptr, ptr %2, i32 11 ; [#uses=1] + %4 = load ptr, ptr %3, align 4 ; [#uses=1] + tail call void %4(ptr %this, ptr %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) + tail call void @_ZN10xalanc_1_814FormatterToXML17writeParentTagEndEv(ptr %this) + tail call void undef(ptr %this, ptr %ch, i32 0, i32 %length, i8 zeroext undef) ret void } diff --git a/llvm/test/CodeGen/Thumb2/2009-08-04-CoalescerAssert.ll b/llvm/test/CodeGen/Thumb2/2009-08-04-CoalescerAssert.ll index b75a14b0a6744d..af3bd57c4752b2 100644 --- a/llvm/test/CodeGen/Thumb2/2009-08-04-CoalescerAssert.ll +++ b/llvm/test/CodeGen/Thumb2/2009-08-04-CoalescerAssert.ll @@ -1,9 +1,9 @@ ; 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] + %struct.FILE = type { i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, i16, i8, [1 x i8], ptr, i64, ptr, ptr, ptr, ptr, i32, i32, [40 x i8] } + %struct._IO_marker = type { ptr, ptr, i32 } +@.str2 = external constant [30 x i8], align 1 ; [#uses=1] define i32 @__mf_heuristic_check(i32 %ptr, i32 %ptr_high) nounwind { entry: @@ -16,14 +16,14 @@ bb1: ; preds = %entry br i1 undef, label %bb9, label %bb2 bb2: ; preds = %bb1 - %0 = call i8* @llvm.frameaddress(i32 0) ; [#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 ; [#uses=0] + %0 = call ptr @llvm.frameaddress(i32 0) ; [#uses=1] + %1 = call i32 (ptr, ptr, ...) @fprintf(ptr noalias undef, ptr noalias @.str2, ptr %0, ptr null) nounwind ; [#uses=0] unreachable bb9: ; preds = %bb1 ret i32 undef } -declare i8* @llvm.frameaddress(i32) nounwind readnone +declare ptr @llvm.frameaddress(i32) nounwind readnone -declare i32 @fprintf(%struct.FILE* noalias nocapture, i8* noalias nocapture, ...) nounwind +declare i32 @fprintf(ptr noalias nocapture, ptr noalias nocapture, ...) nounwind diff --git a/llvm/test/CodeGen/Thumb2/2009-08-04-CoalescerBug.ll b/llvm/test/CodeGen/Thumb2/2009-08-04-CoalescerBug.ll index 20da9ba595b7c0..a5076f849b79b6 100644 --- a/llvm/test/CodeGen/Thumb2/2009-08-04-CoalescerBug.ll +++ b/llvm/test/CodeGen/Thumb2/2009-08-04-CoalescerBug.ll @@ -3,53 +3,53 @@ %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 + %3 = type { ptr } ; 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 = type { ptr, i32, i32, i16, i16, %struct.__sbuf, i32, ptr, ptr, ptr, ptr, ptr, %struct.__sbuf, ptr, 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.LIST = type { ptr, ptr } %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.__sbuf = type { ptr, i32 } + %struct.head_type = type { [2 x %struct.LIST], %struct.FIRST_UNION, %struct.SECOND_UNION, %struct.THIRD_UNION, %struct.FOURTH_UNION, ptr, %3, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, 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 ; [#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] +@.str24239 = external constant [20 x i8], align 1 ; [#uses=1] +@no_file_pos = external global %4 ; [#uses=1] +@zz_tmp = external global ptr ; [#uses=1] +@.str81872 = external constant [10 x i8], align 1 ; [#uses=1] +@out_fp = external global ptr ; [#uses=2] +@cpexists = external global i32 ; [#uses=2] +@.str212784 = external constant [17 x i8], align 1 ; [#uses=1] +@.str1822946 = external constant [8 x i8], align 1 ; [#uses=1] +@.str1842948 = external constant [11 x i8], align 1 ; [#uses=1] -declare i32 @fprintf(%struct.FILE* nocapture, i8* nocapture, ...) nounwind +declare i32 @fprintf(ptr nocapture, ptr nocapture, ...) nounwind -declare i32 @"\01_fwrite"(i8*, i32, i32, i8*) +declare i32 @"\01_fwrite"(ptr, i32, i32, ptr) -declare %struct.FILE* @OpenIncGraphicFile(i8*, i8 zeroext, %struct.rec** nocapture, %struct.FILE_POS*, i32* nocapture) nounwind +declare ptr @OpenIncGraphicFile(ptr, i8 zeroext, ptr nocapture, ptr, ptr nocapture) nounwind -declare void @Error(i32, i32, i8*, i32, %struct.FILE_POS*, ...) nounwind +declare void @Error(i32, i32, ptr, i32, ptr, ...) nounwind -declare i8* @fgets(i8*, i32, %struct.FILE* nocapture) nounwind +declare ptr @fgets(ptr, i32, ptr nocapture) nounwind -define void @PS_PrintGraphicInclude(%struct.rec* %x, i32 %colmark, i32 %rowmark) nounwind { +define void @PS_PrintGraphicInclude(ptr %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] + %.pn = phi ptr [ %y.0, %bb5 ], [ undef, %entry ] ; [#uses=1] + %y.0.in = getelementptr %struct.rec, ptr %.pn, i32 0, i32 0, i32 0, i32 1, i32 0 ; [#uses=1] + %y.0 = load ptr, ptr %y.0.in ; [#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] + %0 = call ptr @OpenIncGraphicFile(ptr undef, i8 zeroext 0, ptr undef, ptr null, ptr undef) nounwind ; [#uses=1] br i1 false, label %bb.i, label %FontHalfXHeight.exit bb.i: ; preds = %bb6 @@ -62,33 +62,33 @@ bb.i1: ; preds = %FontHalfXHeight.exit br label %FontSize.exit FontSize.exit: ; preds = %bb.i1, %FontHalfXHeight.exit - %1 = load i32, i32* undef, align 4 ; [#uses=1] + %1 = load i32, ptr undef, align 4 ; [#uses=1] %2 = icmp ult i32 0, undef ; [#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 + call void (i32, i32, ptr, i32, ptr, ...) @Error(i32 1, i32 2, ptr @.str24239, i32 0, ptr @no_file_pos, ptr @.str81872) 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 ; [#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 ; [#uses=0] + %3 = call i32 (ptr, ptr, ...) @fprintf(ptr undef, ptr @.str1822946, i32 %1, ptr undef) nounwind ; [#uses=0] + %4 = call i32 @"\01_fwrite"(ptr @.str1842948, i32 1, i32 10, ptr undef) nounwind ; [#uses=0] %5 = sub i32 %colmark, undef ; [#uses=1] %6 = sub i32 %rowmark, undef ; [#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 ; [#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 ; [#uses=1] - %10 = load i32, i32* %9, align 4 ; [#uses=1] + %7 = load ptr, ptr @out_fp, align 4 ; [#uses=1] + %8 = call i32 (ptr, ptr, ...) @fprintf(ptr %7, ptr @.str212784, i32 %5, i32 %6) nounwind ; [#uses=0] + store i32 0, ptr @cpexists, align 4 + %9 = getelementptr %struct.rec, ptr %y.0, i32 0, i32 0, i32 3, i32 0, i32 0, i32 1 ; [#uses=1] + %10 = load i32, ptr %9, align 4 ; [#uses=1] %11 = sub i32 0, %10 ; [#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 ; [#uses=0] - store i32 0, i32* @cpexists, align 4 + %12 = load ptr, ptr @out_fp, align 4 ; [#uses=1] + %13 = call i32 (ptr, ptr, ...) @fprintf(ptr %12, ptr @.str212784, i32 undef, i32 %11) nounwind ; [#uses=0] + store i32 0, ptr @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] + %x_addr.0.ph.ph = phi ptr [ %x, %FontName.exit ], [ null, %bb79.critedge ], [ null, %bb1.i3 ] ; [#uses=1] + %14 = getelementptr %struct.rec, ptr %x_addr.0.ph.ph, i32 0, i32 0, i32 1, i32 0 ; [#uses=0] br label %bb100.outer bb.i80: ; preds = %bb3.i85 @@ -116,7 +116,7 @@ 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 ; [#uses=0] + %15 = load i8, ptr undef, align 1 ; [#uses=0] br i1 false, label %StringBeginsWith.exit55thread-split, label %bb3.i52 bb3.i52: ; preds = %bb2.i51 @@ -132,7 +132,7 @@ 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 ; [#uses=0] + %16 = call ptr @fgets(ptr undef, i32 512, ptr %0) nounwind ; [#uses=0] %iftmp.560.0 = select i1 undef, i32 2, i32 0 ; [#uses=1] br label %bb100.outer @@ -143,7 +143,7 @@ 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 + store ptr null, ptr @zz_tmp, align 4 br label %bb100.outer.outer bb100.outer: ; preds = %bb2.i.i15.critedge, %bb100.outer.outer diff --git a/llvm/test/CodeGen/Thumb2/2009-08-04-ScavengerAssert.ll b/llvm/test/CodeGen/Thumb2/2009-08-04-ScavengerAssert.ll index 5656d78423949a..927c3409c8f0b2 100644 --- a/llvm/test/CodeGen/Thumb2/2009-08-04-ScavengerAssert.ll +++ b/llvm/test/CodeGen/Thumb2/2009-08-04-ScavengerAssert.ll @@ -3,81 +3,81 @@ %0 = type { i16, i8, i8 } ; type %0 %1 = type { [2 x i32], [2 x i32] } ; type %1 %2 = type { %struct.GAP } ; type %2 - %3 = type { %struct.rec* } ; type %3 + %3 = type { ptr } ; type %3 %4 = type { i8, i8, i16, i8, i8, i8, i8 } ; type %4 %5 = type { i8, i8, i8, i8 } ; type %5 %struct.COMPOSITE = type { i8, i16, i16 } - %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 = type { ptr, i32, i32, i16, i16, %struct.__sbuf, i32, ptr, ptr, ptr, ptr, ptr, %struct.__sbuf, ptr, 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.FONT_INFO = type { %struct.metrics*, i8*, i16*, %struct.COMPOSITE*, i32, %struct.rec*, %struct.rec*, i16, i16, i16*, i8*, i8*, i16* } + %struct.FONT_INFO = type { ptr, ptr, ptr, ptr, i32, ptr, ptr, i16, i16, ptr, ptr, ptr, ptr } %struct.FOURTH_UNION = type { %struct.STYLE } %struct.GAP = type { i8, i8, i16 } - %struct.LIST = type { %struct.rec*, %struct.rec* } + %struct.LIST = type { ptr, ptr } %struct.SECOND_UNION = type { %0 } %struct.STYLE = type { %2, %2, i16, i16, i32 } %struct.THIRD_UNION = type { %1 } %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.__sbuf = type { ptr, i32 } + %struct.head_type = type { [2 x %struct.LIST], %struct.FIRST_UNION, %struct.SECOND_UNION, %struct.THIRD_UNION, %struct.FOURTH_UNION, ptr, %3, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32 } %struct.metrics = type { i16, i16, i16, i16, i16 } %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] -@.str19294 = external constant [9 x i8], align 1 ; <[9 x i8]*> [#uses=1] -@zz_lengths = external global [150 x i8] ; <[150 x i8]*> [#uses=1] -@next_free.4772 = external global i8** ; [#uses=3] -@top_free.4773 = external global i8** ; [#uses=2] -@.str1575 = external constant [32 x i8], align 1 ; <[32 x i8]*> [#uses=1] -@zz_free = external global [524 x %struct.rec*] ; <[524 x %struct.rec*]*> [#uses=2] -@zz_hold = external global %struct.rec* ; <%struct.rec**> [#uses=5] -@zz_tmp = external global %struct.rec* ; <%struct.rec**> [#uses=2] -@zz_res = external global %struct.rec* ; <%struct.rec**> [#uses=2] -@xx_link = external global %struct.rec* ; <%struct.rec**> [#uses=2] -@font_count = external global i32 ; [#uses=1] -@.str81872 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=1] -@.str101874 = external constant [30 x i8], align 1 ; <[30 x i8]*> [#uses=1] -@.str111875 = external constant [17 x i8], align 1 ; <[17 x i8]*> [#uses=1] -@.str141878 = external constant [27 x i8], align 1 ; <[27 x i8]*> [#uses=1] -@out_fp = external global %struct.FILE* ; <%struct.FILE**> [#uses=3] -@.str192782 = external constant [17 x i8], align 1 ; <[17 x i8]*> [#uses=1] -@cpexists = external global i32 ; [#uses=2] -@.str212784 = external constant [17 x i8], align 1 ; <[17 x i8]*> [#uses=1] -@currentfont = external global i32 ; [#uses=3] -@wordcount = external global i32 ; [#uses=1] -@needs = external global %struct.rec* ; <%struct.rec**> [#uses=1] -@.str742838 = external constant [6 x i8], align 1 ; <[6 x i8]*> [#uses=1] -@.str752839 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=1] -@.str1802944 = external constant [40 x i8], align 1 ; <[40 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] -@.str1852949 = external constant [23 x i8], align 1 ; <[23 x i8]*> [#uses=1] -@.str1872951 = external constant [17 x i8], align 1 ; <[17 x i8]*> [#uses=1] -@.str1932957 = external constant [26 x i8], align 1 ; <[26 x i8]*> [#uses=1] - -declare i32 @fprintf(%struct.FILE* nocapture, i8* nocapture, ...) nounwind - -declare i32 @"\01_fwrite"(i8*, i32, i32, i8*) - -declare i32 @remove(i8* nocapture) nounwind - -declare %struct.FILE* @OpenIncGraphicFile(i8*, i8 zeroext, %struct.rec** nocapture, %struct.FILE_POS*, i32* nocapture) nounwind - -declare %struct.rec* @MakeWord(i32, i8* nocapture, %struct.FILE_POS*) nounwind - -declare void @Error(i32, i32, i8*, i32, %struct.FILE_POS*, ...) nounwind - -declare i32 @"\01_fputs"(i8*, %struct.FILE*) - -declare noalias i8* @calloc(i32, i32) nounwind - -declare i8* @fgets(i8*, i32, %struct.FILE* nocapture) nounwind - -define void @PS_PrintGraphicInclude(%struct.rec* %x, i32 %colmark, i32 %rowmark) nounwind { +@.str24239 = external constant [20 x i8], align 1 ; [#uses=1] +@no_file_pos = external global %4 ; [#uses=1] +@.str19294 = external constant [9 x i8], align 1 ; [#uses=1] +@zz_lengths = external global [150 x i8] ; [#uses=1] +@next_free.4772 = external global ptr ; [#uses=3] +@top_free.4773 = external global ptr ; [#uses=2] +@.str1575 = external constant [32 x i8], align 1 ; [#uses=1] +@zz_free = external global [524 x ptr] ; [#uses=2] +@zz_hold = external global ptr ; [#uses=5] +@zz_tmp = external global ptr ; [#uses=2] +@zz_res = external global ptr ; [#uses=2] +@xx_link = external global ptr ; [#uses=2] +@font_count = external global i32 ; [#uses=1] +@.str81872 = external constant [10 x i8], align 1 ; [#uses=1] +@.str101874 = external constant [30 x i8], align 1 ; [#uses=1] +@.str111875 = external constant [17 x i8], align 1 ; [#uses=1] +@.str141878 = external constant [27 x i8], align 1 ; [#uses=1] +@out_fp = external global ptr ; [#uses=3] +@.str192782 = external constant [17 x i8], align 1 ; [#uses=1] +@cpexists = external global i32 ; [#uses=2] +@.str212784 = external constant [17 x i8], align 1 ; [#uses=1] +@currentfont = external global i32 ; [#uses=3] +@wordcount = external global i32 ; [#uses=1] +@needs = external global ptr ; [#uses=1] +@.str742838 = external constant [6 x i8], align 1 ; [#uses=1] +@.str752839 = external constant [10 x i8], align 1 ; [#uses=1] +@.str1802944 = external constant [40 x i8], align 1 ; [#uses=1] +@.str1822946 = external constant [8 x i8], align 1 ; [#uses=1] +@.str1842948 = external constant [11 x i8], align 1 ; [#uses=1] +@.str1852949 = external constant [23 x i8], align 1 ; [#uses=1] +@.str1872951 = external constant [17 x i8], align 1 ; [#uses=1] +@.str1932957 = external constant [26 x i8], align 1 ; [#uses=1] + +declare i32 @fprintf(ptr nocapture, ptr nocapture, ...) nounwind + +declare i32 @"\01_fwrite"(ptr, i32, i32, ptr) + +declare i32 @remove(ptr nocapture) nounwind + +declare ptr @OpenIncGraphicFile(ptr, i8 zeroext, ptr nocapture, ptr, ptr nocapture) nounwind + +declare ptr @MakeWord(i32, ptr nocapture, ptr) nounwind + +declare void @Error(i32, i32, ptr, i32, ptr, ...) nounwind + +declare i32 @"\01_fputs"(ptr, ptr) + +declare noalias ptr @calloc(i32, i32) nounwind + +declare ptr @fgets(ptr, i32, ptr nocapture) nounwind + +define void @PS_PrintGraphicInclude(ptr %x, i32 %colmark, i32 %rowmark) nounwind { entry: - %buff = alloca [512 x i8], align 4 ; <[512 x i8]*> [#uses=5] - %0 = getelementptr %struct.rec, %struct.rec* %x, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=2] - %1 = load i8, i8* %0, align 4 ; [#uses=1] + %buff = alloca [512 x i8], align 4 ; [#uses=5] + %0 = getelementptr %struct.rec, ptr %x, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=2] + %1 = load i8, ptr %0, align 4 ; [#uses=1] %2 = add i8 %1, -94 ; [#uses=1] %3 = icmp ugt i8 %2, 1 ; [#uses=1] br i1 %3, label %bb, label %bb1 @@ -86,50 +86,49 @@ bb: ; preds = %entry br label %bb1 bb1: ; preds = %bb, %entry - %4 = getelementptr %struct.rec, %struct.rec* %x, i32 0, i32 0, i32 2 ; <%struct.SECOND_UNION*> [#uses=1] - %5 = bitcast %struct.SECOND_UNION* %4 to %5* ; <%5*> [#uses=1] - %6 = getelementptr %5, %5* %5, i32 0, i32 1 ; [#uses=1] - %7 = load i8, i8* %6, align 1 ; [#uses=1] - %8 = icmp eq i8 %7, 0 ; [#uses=1] - br i1 %8, label %bb2, label %bb3 + %4 = getelementptr %struct.rec, ptr %x, i32 0, i32 0, i32 2 ; [#uses=1] + %5 = getelementptr %4, ptr %4, i32 0, i32 1 ; [#uses=1] + %6 = load i8, ptr %5, align 1 ; [#uses=1] + %7 = icmp eq i8 %6, 0 ; [#uses=1] + br i1 %7, label %bb2, label %bb3 bb2: ; preds = %bb1 - 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 ([40 x i8], [40 x i8]* @.str1802944, i32 0, i32 0)) nounwind + call void (i32, i32, ptr, i32, ptr, ...) @Error(i32 1, i32 2, ptr @.str24239, i32 0, ptr @no_file_pos, ptr @.str1802944) nounwind br label %bb3 bb3: ; preds = %bb2, %bb1 - %9 = load %struct.rec*, %struct.rec** undef, align 4 ; <%struct.rec*> [#uses=0] + %8 = load ptr, ptr undef, align 4 ; [#uses=0] br label %bb5 bb5: ; preds = %bb5, %bb3 - %y.0 = load %struct.rec*, %struct.rec** null ; <%struct.rec*> [#uses=2] + %y.0 = load ptr, ptr null ; [#uses=2] br i1 false, label %bb5, label %bb6 bb6: ; preds = %bb5 - %10 = load i8, i8* %0, align 4 ; [#uses=1] - %11 = getelementptr %struct.rec, %struct.rec* %y.0, i32 0, i32 0, i32 1, i32 0 ; <%struct.FILE_POS*> [#uses=1] - %12 = call %struct.FILE* @OpenIncGraphicFile(i8* undef, i8 zeroext %10, %struct.rec** null, %struct.FILE_POS* %11, i32* undef) nounwind ; <%struct.FILE*> [#uses=4] + %9 = load i8, ptr %0, align 4 ; [#uses=1] + %10 = getelementptr %struct.rec, ptr %y.0, i32 0, i32 0, i32 1, i32 0 ; [#uses=1] + %11 = call ptr @OpenIncGraphicFile(ptr undef, i8 zeroext %9, ptr null, ptr %10, ptr undef) nounwind ; [#uses=4] br i1 false, label %bb7, label %bb8 bb7: ; preds = %bb6 unreachable bb8: ; preds = %bb6 - %13 = and i32 undef, 4095 ; [#uses=2] - %14 = load i32, i32* @currentfont, align 4 ; [#uses=0] + %12 = and i32 undef, 4095 ; [#uses=2] + %13 = load i32, ptr @currentfont, align 4 ; [#uses=0] br i1 false, label %bb10, label %bb9 bb9: ; preds = %bb8 - %15 = icmp ult i32 0, %13 ; [#uses=1] - br i1 %15, label %bb.i, label %FontHalfXHeight.exit + %14 = icmp ult i32 0, %12 ; [#uses=1] + br i1 %14, label %bb.i, label %FontHalfXHeight.exit bb.i: ; preds = %bb9 - 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 ([17 x i8], [17 x i8]* @.str111875, i32 0, i32 0)) nounwind - %.pre186 = load i32, i32* @currentfont, align 4 ; [#uses=1] + call void (i32, i32, ptr, i32, ptr, ...) @Error(i32 1, i32 2, ptr @.str24239, i32 0, ptr @no_file_pos, ptr @.str111875) nounwind + %.pre186 = load i32, ptr @currentfont, align 4 ; [#uses=1] br label %FontHalfXHeight.exit FontHalfXHeight.exit: ; preds = %bb.i, %bb9 - %16 = phi i32 [ %.pre186, %bb.i ], [ %13, %bb9 ] ; [#uses=1] + %15 = phi i32 [ %.pre186, %bb.i ], [ %12, %bb9 ] ; [#uses=1] br i1 false, label %bb.i1, label %bb1.i bb.i1: ; preds = %FontHalfXHeight.exit @@ -139,82 +138,82 @@ bb1.i: ; preds = %bb.i1, %FontHalfXHeight.exit br i1 undef, label %bb2.i, label %FontSize.exit bb2.i: ; preds = %bb1.i - call void (i32, i32, i8*, i32, %struct.FILE_POS*, ...) @Error(i32 37, i32 61, i8* getelementptr ([30 x i8], [30 x i8]* @.str101874, i32 0, i32 0), i32 1, %struct.FILE_POS* null) nounwind + call void (i32, i32, ptr, i32, ptr, ...) @Error(i32 37, i32 61, ptr @.str101874, i32 1, ptr null) nounwind unreachable FontSize.exit: ; preds = %bb1.i - %17 = getelementptr %struct.FONT_INFO, %struct.FONT_INFO* undef, i32 %16, i32 5 ; <%struct.rec**> [#uses=0] - %18 = load i32, i32* undef, align 4 ; [#uses=1] - %19 = load i32, i32* @currentfont, align 4 ; [#uses=2] - %20 = load i32, i32* @font_count, align 4 ; [#uses=1] - %21 = icmp ult i32 %20, %19 ; [#uses=1] - br i1 %21, label %bb.i5, label %FontName.exit + %16 = getelementptr %struct.FONT_INFO, ptr undef, i32 %15, i32 5 ; [#uses=0] + %17 = load i32, ptr undef, align 4 ; [#uses=1] + %18 = load i32, ptr @currentfont, align 4 ; [#uses=2] + %19 = load i32, ptr @font_count, align 4 ; [#uses=1] + %20 = icmp ult i32 %19, %18 ; [#uses=1] + br i1 %20, 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 + call void (i32, i32, ptr, i32, ptr, ...) @Error(i32 1, i32 2, ptr @.str24239, i32 0, ptr @no_file_pos, ptr @.str81872) nounwind br label %FontName.exit FontName.exit: ; preds = %bb.i5, %FontSize.exit - %22 = phi %struct.FONT_INFO* [ undef, %bb.i5 ], [ undef, %FontSize.exit ] ; <%struct.FONT_INFO*> [#uses=1] - %23 = getelementptr %struct.FONT_INFO, %struct.FONT_INFO* %22, i32 %19, i32 5 ; <%struct.rec**> [#uses=0] - %24 = call i32 (%struct.FILE*, i8*, ...) @fprintf(%struct.FILE* undef, i8* getelementptr ([8 x i8], [8 x i8]* @.str1822946, i32 0, i32 0), i32 %18, i8* null) nounwind ; [#uses=0] + %21 = phi ptr [ undef, %bb.i5 ], [ undef, %FontSize.exit ] ; [#uses=1] + %22 = getelementptr %struct.FONT_INFO, ptr %21, i32 %18, i32 5 ; [#uses=0] + %23 = call i32 (ptr, ptr, ...) @fprintf(ptr undef, ptr @.str1822946, i32 %17, ptr null) nounwind ; [#uses=0] br label %bb10 bb10: ; preds = %FontName.exit, %bb8 - %25 = call i32 @"\01_fwrite"(i8* getelementptr ([11 x i8], [11 x i8]* @.str1842948, i32 0, i32 0), i32 1, i32 10, i8* undef) nounwind ; [#uses=0] - %26 = sub i32 %rowmark, undef ; [#uses=1] - %27 = load %struct.FILE*, %struct.FILE** @out_fp, align 4 ; <%struct.FILE*> [#uses=1] - %28 = call i32 (%struct.FILE*, i8*, ...) @fprintf(%struct.FILE* %27, i8* getelementptr ([17 x i8], [17 x i8]* @.str212784, i32 0, i32 0), i32 undef, i32 %26) nounwind ; [#uses=0] - store i32 0, i32* @cpexists, align 4 - %29 = call i32 (%struct.FILE*, i8*, ...) @fprintf(%struct.FILE* undef, i8* getelementptr ([17 x i8], [17 x i8]* @.str192782, i32 0, i32 0), double 2.000000e+01, double 2.000000e+01) nounwind ; [#uses=0] - %30 = getelementptr %struct.rec, %struct.rec* %y.0, i32 0, i32 0, i32 3, i32 0, i32 0, i32 0 ; [#uses=1] - %31 = load i32, i32* %30, align 4 ; [#uses=1] - %32 = sub i32 0, %31 ; [#uses=1] - %33 = load i32, i32* undef, align 4 ; [#uses=1] - %34 = sub i32 0, %33 ; [#uses=1] - %35 = load %struct.FILE*, %struct.FILE** @out_fp, align 4 ; <%struct.FILE*> [#uses=1] - %36 = call i32 (%struct.FILE*, i8*, ...) @fprintf(%struct.FILE* %35, i8* getelementptr ([17 x i8], [17 x i8]* @.str212784, i32 0, i32 0), i32 %32, i32 %34) nounwind ; [#uses=0] - store i32 0, i32* @cpexists, align 4 - %37 = load %struct.rec*, %struct.rec** null, align 4 ; <%struct.rec*> [#uses=1] - %38 = getelementptr %struct.rec, %struct.rec* %37, i32 0, i32 0, i32 4 ; <%struct.FOURTH_UNION*> [#uses=1] - %39 = call i32 (%struct.FILE*, i8*, ...) @fprintf(%struct.FILE* undef, i8* getelementptr ([23 x i8], [23 x i8]* @.str1852949, i32 0, i32 0), %struct.FOURTH_UNION* %38) nounwind ; [#uses=0] - %buff14 = getelementptr [512 x i8], [512 x i8]* %buff, i32 0, i32 0 ; [#uses=5] - %40 = call i8* @fgets(i8* %buff14, i32 512, %struct.FILE* %12) nounwind ; [#uses=0] + %24 = call i32 @"\01_fwrite"(ptr @.str1842948, i32 1, i32 10, ptr undef) nounwind ; [#uses=0] + %25 = sub i32 %rowmark, undef ; [#uses=1] + %26 = load ptr, ptr @out_fp, align 4 ; [#uses=1] + %27 = call i32 (ptr, ptr, ...) @fprintf(ptr %26, ptr @.str212784, i32 undef, i32 %25) nounwind ; [#uses=0] + store i32 0, ptr @cpexists, align 4 + %28 = call i32 (ptr, ptr, ...) @fprintf(ptr undef, ptr @.str192782, double 2.000000e+01, double 2.000000e+01) nounwind ; [#uses=0] + %29 = getelementptr %struct.rec, ptr %y.0, i32 0, i32 0, i32 3, i32 0, i32 0, i32 0 ; [#uses=1] + %30 = load i32, ptr %29, align 4 ; [#uses=1] + %31 = sub i32 0, %30 ; [#uses=1] + %32 = load i32, ptr undef, align 4 ; [#uses=1] + %33 = sub i32 0, %32 ; [#uses=1] + %34 = load ptr, ptr @out_fp, align 4 ; [#uses=1] + %35 = call i32 (ptr, ptr, ...) @fprintf(ptr %34, ptr @.str212784, i32 %31, i32 %33) nounwind ; [#uses=0] + store i32 0, ptr @cpexists, align 4 + %36 = load ptr, ptr null, align 4 ; [#uses=1] + %37 = getelementptr %struct.rec, ptr %36, i32 0, i32 0, i32 4 ; [#uses=1] + %38 = call i32 (ptr, ptr, ...) @fprintf(ptr undef, ptr @.str1852949, ptr %37) nounwind ; [#uses=0] + %buff14 = getelementptr [512 x i8], ptr %buff, i32 0, i32 0 ; [#uses=5] + %39 = call ptr @fgets(ptr %buff14, i32 512, ptr %11) nounwind ; [#uses=0] %iftmp.506.0 = select i1 undef, i32 2, i32 0 ; [#uses=1] - %41 = getelementptr [512 x i8], [512 x i8]* %buff, i32 0, i32 26 ; [#uses=1] + %40 = getelementptr [512 x i8], ptr %buff, i32 0, i32 26 ; [#uses=1] br label %bb100.outer.outer bb100.outer.outer: ; preds = %bb83, %bb10 %state.0.ph.ph = phi i32 [ %iftmp.506.0, %bb10 ], [ undef, %bb83 ] ; [#uses=1] - %x_addr.0.ph.ph = phi %struct.rec* [ %x, %bb10 ], [ %71, %bb83 ] ; <%struct.rec*> [#uses=1] - %42 = getelementptr %struct.rec, %struct.rec* %x_addr.0.ph.ph, i32 0, i32 0, i32 1, i32 0 ; <%struct.FILE_POS*> [#uses=0] + %x_addr.0.ph.ph = phi ptr [ %x, %bb10 ], [ %70, %bb83 ] ; [#uses=1] + %41 = getelementptr %struct.rec, ptr %x_addr.0.ph.ph, i32 0, i32 0, i32 1, i32 0 ; [#uses=0] br label %bb100.outer bb.i80: ; preds = %bb3.i85 - %43 = icmp eq i8 %44, %46 ; [#uses=1] + %42 = icmp eq i8 %43, %45 ; [#uses=1] %indvar.next.i79 = add i32 %indvar.i81, 1 ; [#uses=1] - br i1 %43, label %bb2.i84, label %bb2.i51 + br i1 %42, label %bb2.i84, label %bb2.i51 bb2.i84: ; preds = %bb100.outer, %bb.i80 %indvar.i81 = phi i32 [ %indvar.next.i79, %bb.i80 ], [ 0, %bb100.outer ] ; [#uses=3] - %pp.0.i82 = getelementptr [27 x i8], [27 x i8]* @.str141878, i32 0, i32 %indvar.i81 ; [#uses=2] - %sp.0.i83 = getelementptr [512 x i8], [512 x i8]* %buff, i32 0, i32 %indvar.i81 ; [#uses=1] - %44 = load i8, i8* %sp.0.i83, align 1 ; [#uses=2] - %45 = icmp eq i8 %44, 0 ; [#uses=1] - br i1 %45, label %StringBeginsWith.exit88thread-split, label %bb3.i85 + %pp.0.i82 = getelementptr [27 x i8], ptr @.str141878, i32 0, i32 %indvar.i81 ; [#uses=2] + %sp.0.i83 = getelementptr [512 x i8], ptr %buff, i32 0, i32 %indvar.i81 ; [#uses=1] + %43 = load i8, ptr %sp.0.i83, align 1 ; [#uses=2] + %44 = icmp eq i8 %43, 0 ; [#uses=1] + br i1 %44, label %StringBeginsWith.exit88thread-split, label %bb3.i85 bb3.i85: ; preds = %bb2.i84 - %46 = load i8, i8* %pp.0.i82, align 1 ; [#uses=3] - %47 = icmp eq i8 %46, 0 ; [#uses=1] - br i1 %47, label %StringBeginsWith.exit88, label %bb.i80 + %45 = load i8, ptr %pp.0.i82, align 1 ; [#uses=3] + %46 = icmp eq i8 %45, 0 ; [#uses=1] + br i1 %46, label %StringBeginsWith.exit88, label %bb.i80 StringBeginsWith.exit88thread-split: ; preds = %bb2.i84 - %.pr = load i8, i8* %pp.0.i82 ; [#uses=1] + %.pr = load i8, ptr %pp.0.i82 ; [#uses=1] br label %StringBeginsWith.exit88 StringBeginsWith.exit88: ; preds = %StringBeginsWith.exit88thread-split, %bb3.i85 - %48 = phi i8 [ %.pr, %StringBeginsWith.exit88thread-split ], [ %46, %bb3.i85 ] ; [#uses=1] - %phitmp91 = icmp eq i8 %48, 0 ; [#uses=1] + %47 = phi i8 [ %.pr, %StringBeginsWith.exit88thread-split ], [ %45, %bb3.i85 ] ; [#uses=1] + %phitmp91 = icmp eq i8 %47, 0 ; [#uses=1] br i1 %phitmp91, label %bb3.i77, label %bb2.i51 bb2.i.i68: ; preds = %bb3.i77 @@ -224,19 +223,19 @@ bb2.i75: ; preds = %bb2.i.i68 br label %bb3.i77 bb3.i77: ; preds = %bb2.i75, %StringBeginsWith.exit88 - %sp.0.i76 = getelementptr [512 x i8], [512 x i8]* %buff, i32 0, i32 undef ; [#uses=1] - %49 = load i8, i8* %sp.0.i76, align 1 ; [#uses=1] - %50 = icmp eq i8 %49, 0 ; [#uses=1] - br i1 %50, label %bb24, label %bb2.i.i68 + %sp.0.i76 = getelementptr [512 x i8], ptr %buff, i32 0, i32 undef ; [#uses=1] + %48 = load i8, ptr %sp.0.i76, align 1 ; [#uses=1] + %49 = icmp eq i8 %48, 0 ; [#uses=1] + br i1 %49, label %bb24, label %bb2.i.i68 bb24: ; preds = %bb3.i77 - %51 = call %struct.rec* @MakeWord(i32 11, i8* %41, %struct.FILE_POS* bitcast (%4* @no_file_pos to %struct.FILE_POS*)) nounwind ; <%struct.rec*> [#uses=0] - %52 = load i8, i8* getelementptr ([150 x i8], [150 x i8]* @zz_lengths, i32 0, i32 0), align 4 ; [#uses=1] - %53 = zext i8 %52 to i32 ; [#uses=2] - %54 = getelementptr [524 x %struct.rec*], [524 x %struct.rec*]* @zz_free, i32 0, i32 %53 ; <%struct.rec**> [#uses=2] - %55 = load %struct.rec*, %struct.rec** %54, align 4 ; <%struct.rec*> [#uses=3] - %56 = icmp eq %struct.rec* %55, null ; [#uses=1] - br i1 %56, label %bb27, label %bb28 + %50 = call ptr @MakeWord(i32 11, ptr %40, ptr @no_file_pos) nounwind ; [#uses=0] + %51 = load i8, ptr @zz_lengths, align 4 ; [#uses=1] + %52 = zext i8 %51 to i32 ; [#uses=2] + %53 = getelementptr [524 x ptr], ptr @zz_free, i32 0, i32 %52 ; [#uses=2] + %54 = load ptr, ptr %53, align 4 ; [#uses=3] + %55 = icmp eq ptr %54, null ; [#uses=1] + br i1 %55, label %bb27, label %bb28 bb27: ; preds = %bb24 br i1 undef, label %bb.i56, label %GetMemory.exit62 @@ -245,64 +244,64 @@ bb.i56: ; preds = %bb27 br i1 undef, label %bb1.i58, label %bb2.i60 bb1.i58: ; preds = %bb.i56 - call void (i32, i32, i8*, i32, %struct.FILE_POS*, ...) @Error(i32 31, i32 1, i8* getelementptr ([32 x i8], [32 x i8]* @.str1575, i32 0, i32 0), i32 1, %struct.FILE_POS* bitcast (%4* @no_file_pos to %struct.FILE_POS*)) nounwind + call void (i32, i32, ptr, i32, ptr, ...) @Error(i32 31, i32 1, ptr @.str1575, i32 1, ptr @no_file_pos) nounwind br label %bb2.i60 bb2.i60: ; preds = %bb1.i58, %bb.i56 - %.pre1.i59 = phi i8** [ undef, %bb1.i58 ], [ undef, %bb.i56 ] ; [#uses=1] - store i8** undef, i8*** @top_free.4773, align 4 + %.pre1.i59 = phi ptr [ undef, %bb1.i58 ], [ undef, %bb.i56 ] ; [#uses=1] + store ptr undef, ptr @top_free.4773, align 4 br label %GetMemory.exit62 GetMemory.exit62: ; preds = %bb2.i60, %bb27 - %57 = phi i8** [ %.pre1.i59, %bb2.i60 ], [ undef, %bb27 ] ; [#uses=1] - %58 = getelementptr i8*, i8** %57, i32 %53 ; [#uses=1] - store i8** %58, i8*** @next_free.4772, align 4 - store %struct.rec* undef, %struct.rec** @zz_hold, align 4 + %56 = phi ptr [ %.pre1.i59, %bb2.i60 ], [ undef, %bb27 ] ; [#uses=1] + %57 = getelementptr ptr, ptr %56, i32 %52 ; [#uses=1] + store ptr %57, ptr @next_free.4772, align 4 + store ptr undef, ptr @zz_hold, align 4 br label %bb29 bb28: ; preds = %bb24 - store %struct.rec* %55, %struct.rec** @zz_hold, align 4 - %59 = load %struct.rec*, %struct.rec** null, align 4 ; <%struct.rec*> [#uses=1] - store %struct.rec* %59, %struct.rec** %54, align 4 + store ptr %54, ptr @zz_hold, align 4 + %58 = load ptr, ptr null, align 4 ; [#uses=1] + store ptr %58, ptr %53, align 4 br label %bb29 bb29: ; preds = %bb28, %GetMemory.exit62 - %.pre184 = phi %struct.rec* [ %55, %bb28 ], [ undef, %GetMemory.exit62 ] ; <%struct.rec*> [#uses=3] - store i8 0, i8* undef - store %struct.rec* %.pre184, %struct.rec** @xx_link, align 4 + %.pre184 = phi ptr [ %54, %bb28 ], [ undef, %GetMemory.exit62 ] ; [#uses=3] + store i8 0, ptr undef + store ptr %.pre184, ptr @xx_link, align 4 br i1 undef, label %bb35, label %bb31 bb31: ; preds = %bb29 - store %struct.rec* %.pre184, %struct.rec** undef + store ptr %.pre184, ptr undef br label %bb35 bb35: ; preds = %bb31, %bb29 br i1 undef, label %bb41, label %bb37 bb37: ; preds = %bb35 - %60 = load %struct.rec*, %struct.rec** null, align 4 ; <%struct.rec*> [#uses=1] - store %struct.rec* %60, %struct.rec** undef - store %struct.rec* undef, %struct.rec** null - store %struct.rec* %.pre184, %struct.rec** null, align 4 + %59 = load ptr, ptr null, align 4 ; [#uses=1] + store ptr %59, ptr undef + store ptr undef, ptr null + store ptr %.pre184, ptr null, align 4 br label %bb41 bb41: ; preds = %bb37, %bb35 - %61 = call i8* @fgets(i8* %buff14, i32 512, %struct.FILE* %12) nounwind ; [#uses=1] - %62 = icmp eq i8* %61, null ; [#uses=1] - %iftmp.554.0 = select i1 %62, i32 2, i32 1 ; [#uses=1] + %60 = call ptr @fgets(ptr %buff14, i32 512, ptr %11) nounwind ; [#uses=1] + %61 = icmp eq ptr %60, null ; [#uses=1] + %iftmp.554.0 = select i1 %61, i32 2, i32 1 ; [#uses=1] br label %bb100.outer bb.i47: ; preds = %bb3.i52 - %63 = icmp eq i8 %64, %65 ; [#uses=1] - br i1 %63, label %bb2.i51, label %bb2.i41 + %62 = icmp eq i8 %63, %64 ; [#uses=1] + br i1 %62, label %bb2.i51, label %bb2.i41 bb2.i51: ; preds = %bb.i47, %bb2.i.i68, %StringBeginsWith.exit88, %bb.i80 - %pp.0.i49 = getelementptr [17 x i8], [17 x i8]* @.str1872951, i32 0, i32 0 ; [#uses=1] - %64 = load i8, i8* null, align 1 ; [#uses=1] + %pp.0.i49 = getelementptr [17 x i8], ptr @.str1872951, i32 0, i32 0 ; [#uses=1] + %63 = load i8, ptr null, align 1 ; [#uses=1] br i1 false, label %StringBeginsWith.exit55thread-split, label %bb3.i52 bb3.i52: ; preds = %bb2.i51 - %65 = load i8, i8* %pp.0.i49, align 1 ; [#uses=1] + %64 = load i8, ptr %pp.0.i49, align 1 ; [#uses=1] br i1 false, label %StringBeginsWith.exit55, label %bb.i47 StringBeginsWith.exit55thread-split: ; preds = %bb2.i51 @@ -318,35 +317,35 @@ bb2.i41: ; preds = %bb2.i41, %bb49, %StringBeginsWith.exit55, %bb.i47 br i1 false, label %bb2.i41, label %bb2.i.i15 bb2.i.i15: ; preds = %bb2.i41 - %pp.0.i.i13 = getelementptr [6 x i8], [6 x i8]* @.str742838, i32 0, i32 0 ; [#uses=1] + %pp.0.i.i13 = getelementptr [6 x i8], ptr @.str742838, i32 0, i32 0 ; [#uses=1] br i1 false, label %StringBeginsWith.exitthread-split.i18, label %bb3.i.i16 bb3.i.i16: ; preds = %bb2.i.i15 - %66 = load i8, i8* %pp.0.i.i13, align 1 ; [#uses=1] + %65 = load i8, ptr %pp.0.i.i13, align 1 ; [#uses=1] br label %StringBeginsWith.exit.i20 StringBeginsWith.exitthread-split.i18: ; preds = %bb2.i.i15 br label %StringBeginsWith.exit.i20 StringBeginsWith.exit.i20: ; preds = %StringBeginsWith.exitthread-split.i18, %bb3.i.i16 - %67 = phi i8 [ undef, %StringBeginsWith.exitthread-split.i18 ], [ %66, %bb3.i.i16 ] ; [#uses=1] - %phitmp.i19 = icmp eq i8 %67, 0 ; [#uses=1] + %66 = phi i8 [ undef, %StringBeginsWith.exitthread-split.i18 ], [ %65, %bb3.i.i16 ] ; [#uses=1] + %phitmp.i19 = icmp eq i8 %66, 0 ; [#uses=1] br i1 %phitmp.i19, label %bb58, label %bb2.i6.i26 bb2.i6.i26: ; preds = %bb2.i6.i26, %StringBeginsWith.exit.i20 %indvar.i3.i23 = phi i32 [ %indvar.next.i1.i21, %bb2.i6.i26 ], [ 0, %StringBeginsWith.exit.i20 ] ; [#uses=3] - %sp.0.i5.i25 = getelementptr [512 x i8], [512 x i8]* %buff, i32 0, i32 %indvar.i3.i23 ; [#uses=0] - %pp.0.i4.i24 = getelementptr [10 x i8], [10 x i8]* @.str752839, i32 0, i32 %indvar.i3.i23 ; [#uses=1] - %68 = load i8, i8* %pp.0.i4.i24, align 1 ; [#uses=0] + %sp.0.i5.i25 = getelementptr [512 x i8], ptr %buff, i32 0, i32 %indvar.i3.i23 ; [#uses=0] + %pp.0.i4.i24 = getelementptr [10 x i8], ptr @.str752839, i32 0, i32 %indvar.i3.i23 ; [#uses=1] + %67 = load i8, ptr %pp.0.i4.i24, align 1 ; [#uses=0] %indvar.next.i1.i21 = add i32 %indvar.i3.i23, 1 ; [#uses=1] br i1 undef, label %bb2.i6.i26, label %bb55 bb55: ; preds = %bb2.i6.i26 - %69 = call i32 @"\01_fputs"(i8* %buff14, %struct.FILE* undef) nounwind ; [#uses=0] + %68 = call i32 @"\01_fputs"(ptr %buff14, ptr undef) nounwind ; [#uses=0] unreachable bb58: ; preds = %StringBeginsWith.exit.i20 - %70 = call i8* @fgets(i8* %buff14, i32 512, %struct.FILE* %12) nounwind ; [#uses=0] + %69 = call ptr @fgets(ptr %buff14, i32 512, ptr %11) nounwind ; [#uses=0] %iftmp.560.0 = select i1 undef, i32 2, i32 0 ; [#uses=1] br label %bb100.outer @@ -367,79 +366,77 @@ StringBeginsWith.exit: ; preds = %StringBeginsWith.exitthread-split, %bb3.i br i1 %phitmp93, label %bb66, label %bb2.i.i bb66: ; preds = %StringBeginsWith.exit - %71 = call %struct.rec* @MakeWord(i32 11, i8* undef, %struct.FILE_POS* bitcast (%4* @no_file_pos to %struct.FILE_POS*)) nounwind ; <%struct.rec*> [#uses=4] - %72 = load i8, i8* getelementptr ([150 x i8], [150 x i8]* @zz_lengths, i32 0, i32 0), align 4 ; [#uses=1] - %73 = zext i8 %72 to i32 ; [#uses=2] - %74 = getelementptr [524 x %struct.rec*], [524 x %struct.rec*]* @zz_free, i32 0, i32 %73 ; <%struct.rec**> [#uses=2] - %75 = load %struct.rec*, %struct.rec** %74, align 4 ; <%struct.rec*> [#uses=3] - %76 = icmp eq %struct.rec* %75, null ; [#uses=1] - br i1 %76, label %bb69, label %bb70 + %70 = call ptr @MakeWord(i32 11, ptr undef, ptr @no_file_pos) nounwind ; [#uses=4] + %71 = load i8, ptr @zz_lengths, align 4 ; [#uses=1] + %72 = zext i8 %71 to i32 ; [#uses=2] + %73 = getelementptr [524 x ptr], ptr @zz_free, i32 0, i32 %72 ; [#uses=2] + %74 = load ptr, ptr %73, align 4 ; [#uses=3] + %75 = icmp eq ptr %74, null ; [#uses=1] + br i1 %75, label %bb69, label %bb70 bb69: ; preds = %bb66 br i1 undef, label %bb.i2, label %GetMemory.exit bb.i2: ; preds = %bb69 - %77 = call noalias i8* @calloc(i32 1020, i32 4) nounwind ; [#uses=1] - %78 = bitcast i8* %77 to i8** ; [#uses=3] - store i8** %78, i8*** @next_free.4772, align 4 + %76 = call noalias ptr @calloc(i32 1020, i32 4) nounwind ; [#uses=1] + store ptr %76, ptr @next_free.4772, align 4 br i1 undef, label %bb1.i3, label %bb2.i4 bb1.i3: ; preds = %bb.i2 - call void (i32, i32, i8*, i32, %struct.FILE_POS*, ...) @Error(i32 31, i32 1, i8* getelementptr ([32 x i8], [32 x i8]* @.str1575, i32 0, i32 0), i32 1, %struct.FILE_POS* bitcast (%4* @no_file_pos to %struct.FILE_POS*)) nounwind + call void (i32, i32, ptr, i32, ptr, ...) @Error(i32 31, i32 1, ptr @.str1575, i32 1, ptr @no_file_pos) nounwind br label %bb2.i4 bb2.i4: ; preds = %bb1.i3, %bb.i2 - %.pre1.i = phi i8** [ undef, %bb1.i3 ], [ %78, %bb.i2 ] ; [#uses=1] - %79 = phi i8** [ undef, %bb1.i3 ], [ %78, %bb.i2 ] ; [#uses=1] - %80 = getelementptr i8*, i8** %79, i32 1020 ; [#uses=1] - store i8** %80, i8*** @top_free.4773, align 4 + %.pre1.i = phi ptr [ undef, %bb1.i3 ], [ %76, %bb.i2 ] ; [#uses=1] + %77 = phi ptr [ undef, %bb1.i3 ], [ %76, %bb.i2 ] ; [#uses=1] + %78 = getelementptr ptr, ptr %77, i32 1020 ; [#uses=1] + store ptr %78, ptr @top_free.4773, align 4 br label %GetMemory.exit GetMemory.exit: ; preds = %bb2.i4, %bb69 - %81 = phi i8** [ %.pre1.i, %bb2.i4 ], [ undef, %bb69 ] ; [#uses=2] - %82 = bitcast i8** %81 to %struct.rec* ; <%struct.rec*> [#uses=3] - %83 = getelementptr i8*, i8** %81, i32 %73 ; [#uses=1] - store i8** %83, i8*** @next_free.4772, align 4 - store %struct.rec* %82, %struct.rec** @zz_hold, align 4 + %79 = phi ptr [ %.pre1.i, %bb2.i4 ], [ undef, %bb69 ] ; [#uses=2] + %80 = getelementptr ptr, ptr %79, i32 %72 ; [#uses=1] + store ptr %80, ptr @next_free.4772, align 4 + store ptr %79, ptr @zz_hold, align 4 br label %bb71 bb70: ; preds = %bb66 - %84 = load %struct.rec*, %struct.rec** null, align 4 ; <%struct.rec*> [#uses=1] - store %struct.rec* %84, %struct.rec** %74, align 4 + %81 = load ptr, ptr null, align 4 ; [#uses=1] + store ptr %81, ptr %73, align 4 br label %bb71 bb71: ; preds = %bb70, %GetMemory.exit - %.pre185 = phi %struct.rec* [ %75, %bb70 ], [ %82, %GetMemory.exit ] ; <%struct.rec*> [#uses=8] - %85 = phi %struct.rec* [ %75, %bb70 ], [ %82, %GetMemory.exit ] ; <%struct.rec*> [#uses=1] - %86 = getelementptr %struct.rec, %struct.rec* %85, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=0] - %87 = getelementptr %struct.rec, %struct.rec* %.pre185, i32 0, i32 0, i32 0, i32 1, i32 1 ; <%struct.rec**> [#uses=0] - %88 = getelementptr %struct.rec, %struct.rec* %.pre185, i32 0, i32 0, i32 0, i32 1, i32 0 ; <%struct.rec**> [#uses=1] - store %struct.rec* %.pre185, %struct.rec** @xx_link, align 4 - store %struct.rec* %.pre185, %struct.rec** @zz_res, align 4 - %89 = load %struct.rec*, %struct.rec** @needs, align 4 ; <%struct.rec*> [#uses=2] - store %struct.rec* %89, %struct.rec** @zz_hold, align 4 + %.pre185 = phi ptr [ %74, %bb70 ], [ %79, %GetMemory.exit ] ; [#uses=8] + %82 = phi ptr [ %74, %bb70 ], [ %79, %GetMemory.exit ] ; [#uses=1] + %83 = getelementptr %struct.rec, ptr %82, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=0] + %84 = getelementptr %struct.rec, ptr %.pre185, i32 0, i32 0, i32 0, i32 1, i32 1 ; [#uses=0] + %85 = getelementptr %struct.rec, ptr %.pre185, i32 0, i32 0, i32 0, i32 1, i32 0 ; [#uses=1] + store ptr %.pre185, ptr @xx_link, align 4 + store ptr %.pre185, ptr @zz_res, align 4 + %86 = load ptr, ptr @needs, align 4 ; [#uses=2] + store ptr %86, ptr @zz_hold, align 4 br i1 false, label %bb77, label %bb73 bb73: ; preds = %bb71 - %90 = getelementptr %struct.rec, %struct.rec* %89, i32 0, i32 0, i32 0, i32 0, i32 0 ; <%struct.rec**> [#uses=1] - store %struct.rec* null, %struct.rec** @zz_tmp, align 4 - store %struct.rec* %.pre185, %struct.rec** %90 - store %struct.rec* %.pre185, %struct.rec** undef, align 4 + %87 = getelementptr %struct.rec, ptr %86, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1] + store ptr null, ptr @zz_tmp, align 4 + store ptr %.pre185, ptr %87 + store ptr %.pre185, ptr undef, align 4 br label %bb77 bb77: ; preds = %bb73, %bb71 - store %struct.rec* %.pre185, %struct.rec** @zz_res, align 4 - store %struct.rec* %71, %struct.rec** @zz_hold, align 4 + store ptr %.pre185, ptr @zz_res, align 4 + store ptr %70, ptr @zz_hold, align 4 br i1 undef, label %bb83, label %bb79 bb79: ; preds = %bb77 - %91 = getelementptr %struct.rec, %struct.rec* %71, i32 0, i32 0, i32 0, i32 1, i32 0 ; <%struct.rec**> [#uses=1] - store %struct.rec* null, %struct.rec** @zz_tmp, align 4 - %92 = load %struct.rec*, %struct.rec** %88, align 4 ; <%struct.rec*> [#uses=1] - store %struct.rec* %92, %struct.rec** %91 - %93 = getelementptr %struct.rec, %struct.rec* undef, i32 0, i32 0, i32 0, i32 1, i32 1 ; <%struct.rec**> [#uses=1] - store %struct.rec* %71, %struct.rec** %93, align 4 - store %struct.rec* %.pre185, %struct.rec** undef, align 4 + %88 = getelementptr %struct.rec, ptr %70, i32 0, i32 0, i32 0, i32 1, i32 0 ; [#uses=1] + store ptr null, ptr @zz_tmp, align 4 + %89 = load ptr, ptr %85, align 4 ; [#uses=1] + store ptr %89, ptr %88 + %90 = getelementptr %struct.rec, ptr undef, i32 0, i32 0, i32 0, i32 1, i32 1 ; [#uses=1] + store ptr %70, ptr %90, align 4 + store ptr %.pre185, ptr undef, align 4 br label %bb83 bb83: ; preds = %bb79, %bb77 @@ -467,22 +464,22 @@ bb2.i6.i: ; preds = %bb.i2.i, %StringBeginsWith.exit.i, %bb.i.i br i1 undef, label %strip_out.exitthread-split, label %bb3.i7.i bb3.i7.i: ; preds = %bb2.i6.i - %94 = load i8, i8* undef, align 1 ; [#uses=1] + %91 = load i8, ptr undef, align 1 ; [#uses=1] br i1 undef, label %strip_out.exit, label %bb.i2.i strip_out.exitthread-split: ; preds = %bb2.i6.i - %.pr100 = load i8, i8* undef ; [#uses=1] + %.pr100 = load i8, ptr undef ; [#uses=1] br label %strip_out.exit strip_out.exit: ; preds = %strip_out.exitthread-split, %bb3.i7.i - %95 = phi i8 [ %.pr100, %strip_out.exitthread-split ], [ %94, %bb3.i7.i ] ; [#uses=0] + %92 = phi i8 [ %.pr100, %strip_out.exitthread-split ], [ %91, %bb3.i7.i ] ; [#uses=0] br i1 undef, label %bb94, label %bb91 bb91: ; preds = %strip_out.exit, %bb.i2.i unreachable bb94: ; preds = %strip_out.exit, %StringBeginsWith.exit.i - %96 = call i8* @fgets(i8* %buff14, i32 512, %struct.FILE* %12) nounwind ; [#uses=0] + %93 = call ptr @fgets(ptr %buff14, i32 512, ptr %11) nounwind ; [#uses=0] unreachable bb100.outer: ; preds = %bb58, %bb41, %bb100.outer.outer @@ -493,16 +490,16 @@ bb100.outer: ; preds = %bb58, %bb41, %bb100.outer.outer ] bb101.split: ; preds = %bb100.outer - %97 = icmp eq i32 undef, 0 ; [#uses=1] - br i1 %97, label %bb103, label %bb102 + %94 = icmp eq i32 undef, 0 ; [#uses=1] + br i1 %94, label %bb103, label %bb102 bb102: ; preds = %bb101.split - %98 = call i32 @remove(i8* getelementptr ([9 x i8], [9 x i8]* @.str19294, i32 0, i32 0)) nounwind ; [#uses=0] + %95 = call i32 @remove(ptr @.str19294) nounwind ; [#uses=0] unreachable bb103: ; preds = %bb101.split - %99 = load %struct.FILE*, %struct.FILE** @out_fp, align 4 ; <%struct.FILE*> [#uses=1] - %100 = call i32 (%struct.FILE*, i8*, ...) @fprintf(%struct.FILE* %99, i8* getelementptr ([26 x i8], [26 x i8]* @.str1932957, i32 0, i32 0)) nounwind ; [#uses=0] - store i32 0, i32* @wordcount, align 4 + %96 = load ptr, ptr @out_fp, align 4 ; [#uses=1] + %97 = call i32 (ptr, ptr, ...) @fprintf(ptr %96, ptr @.str1932957) nounwind ; [#uses=0] + store i32 0, ptr @wordcount, align 4 ret void } diff --git a/llvm/test/CodeGen/Thumb2/2009-08-04-SubregLoweringBug.ll b/llvm/test/CodeGen/Thumb2/2009-08-04-SubregLoweringBug.ll index 2c6c05d5e21ea3..59c93845e9d6a6 100644 --- a/llvm/test/CodeGen/Thumb2/2009-08-04-SubregLoweringBug.ll +++ b/llvm/test/CodeGen/Thumb2/2009-08-04-SubregLoweringBug.ll @@ -2,17 +2,17 @@ ; 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.List = type { ptr, ptr, ptr } + %struct.Patient = type { i32, i32, i32, ptr } %struct.Results = type { float, float, float } - %struct.Village = type { [4 x %struct.Village*], %struct.Village*, %struct.List, %struct.Hosp, i32, i32 } + %struct.Village = type { [4 x ptr], ptr, %struct.List, %struct.Hosp, i32, i32 } -define void @get_results(%struct.Results* noalias nocapture sret(%struct.Results) %agg.result, %struct.Village* %village) nounwind { +define void @get_results(ptr noalias nocapture sret(%struct.Results) %agg.result, ptr %village) nounwind { entry: br i1 undef, label %bb, label %bb6.preheader bb6.preheader: ; preds = %entry - call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 undef, i8* align 4 undef, i32 12, i1 false) + call void @llvm.memcpy.p0.p0.i32(ptr align 4 undef, ptr align 4 undef, i32 12, i1 false) br i1 undef, label %bb15, label %bb13 bb: ; preds = %entry @@ -26,8 +26,8 @@ bb13: ; preds = %bb13, %bb6.preheader bb15: ; preds = %bb13, %bb6.preheader %r1.0.0.lcssa = phi float [ 0.000000e+00, %bb6.preheader ], [ %1, %bb13 ] ; [#uses=1] %r1.1.0.lcssa = phi float [ undef, %bb6.preheader ], [ %0, %bb13 ] ; [#uses=0] - store float %r1.0.0.lcssa, float* undef, align 4 + store float %r1.0.0.lcssa, ptr undef, align 4 ret void } -declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i1) nounwind +declare void @llvm.memcpy.p0.p0.i32(ptr nocapture, ptr nocapture, i32, i1) nounwind diff --git a/llvm/test/CodeGen/Thumb2/2009-08-04-SubregLoweringBug2.ll b/llvm/test/CodeGen/Thumb2/2009-08-04-SubregLoweringBug2.ll index 9d4fc313cf9c58..3b7bde4f960b7a 100644 --- a/llvm/test/CodeGen/Thumb2/2009-08-04-SubregLoweringBug2.ll +++ b/llvm/test/CodeGen/Thumb2/2009-08-04-SubregLoweringBug2.ll @@ -2,11 +2,11 @@ ; 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 } + %struct.List = type { ptr, ptr, ptr } + %struct.Patient = type { i32, i32, i32, ptr } + %struct.Village = type { [4 x ptr], ptr, %struct.List, %struct.Hosp, i32, i32 } -define %struct.List* @sim(%struct.Village* %village) nounwind { +define ptr @sim(ptr %village) nounwind { entry: br i1 undef, label %bb14, label %bb3.preheader @@ -19,11 +19,11 @@ bb5: ; preds = %bb5, %bb3.preheader bb11: ; preds = %bb5 %0 = fmul float undef, 0x41E0000000000000 ; [#uses=1] %1 = fptosi float %0 to i32 ; [#uses=1] - store i32 %1, i32* undef, align 4 + store i32 %1, ptr 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 + ret ptr null generate_patient.exit: ; preds = %bb11 br i1 undef, label %bb14, label %bb12 @@ -32,11 +32,11 @@ bb12: ; preds = %generate_patient.exit br i1 undef, label %bb.i, label %bb1.i bb.i: ; preds = %bb12 - ret %struct.List* null + ret ptr null bb1.i: ; preds = %bb12 - ret %struct.List* null + ret ptr null bb14: ; preds = %generate_patient.exit, %entry - ret %struct.List* undef + ret ptr undef } diff --git a/llvm/test/CodeGen/Thumb2/2009-08-04-SubregLoweringBug3.ll b/llvm/test/CodeGen/Thumb2/2009-08-04-SubregLoweringBug3.ll index 66ed876f98e3ea..1343057e9056f4 100644 --- a/llvm/test/CodeGen/Thumb2/2009-08-04-SubregLoweringBug3.ll +++ b/llvm/test/CodeGen/Thumb2/2009-08-04-SubregLoweringBug3.ll @@ -2,11 +2,11 @@ ; 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 } + %struct.List = type { ptr, ptr, ptr } + %struct.Patient = type { i32, i32, i32, ptr } + %struct.Village = type { [4 x ptr], ptr, %struct.List, %struct.Hosp, i32, i32 } -define %struct.List* @sim(%struct.Village* %village) nounwind { +define ptr @sim(ptr %village) nounwind { entry: br i1 undef, label %bb14, label %bb3.preheader @@ -17,7 +17,7 @@ bb5: ; preds = %bb5, %bb3.preheader br i1 undef, label %bb11, label %bb5 bb11: ; preds = %bb5 - %0 = load i32, i32* undef, align 4 ; [#uses=1] + %0 = load i32, ptr undef, align 4 ; [#uses=1] %1 = xor i32 %0, 123459876 ; [#uses=1] %2 = sdiv i32 %1, 127773 ; [#uses=1] %3 = mul i32 %2, 2836 ; [#uses=1] @@ -29,13 +29,13 @@ bb11: ; preds = %bb5 %8 = fptrunc double %7 to float ; [#uses=2] %9 = fmul float %8, 0x41E0000000000000 ; [#uses=1] %10 = fptosi float %9 to i32 ; [#uses=1] - store i32 %10, i32* undef, align 4 + store i32 %10, ptr undef, align 4 %11 = fpext float %8 to double ; [#uses=1] %12 = fcmp ogt double %11, 6.660000e-01 ; [#uses=1] br i1 %12, label %generate_patient.exit, label %generate_patient.exit.thread generate_patient.exit.thread: ; preds = %bb11 - ret %struct.List* null + ret ptr null generate_patient.exit: ; preds = %bb11 br i1 undef, label %bb14, label %bb12 @@ -44,11 +44,11 @@ bb12: ; preds = %generate_patient.exit br i1 undef, label %bb.i, label %bb1.i bb.i: ; preds = %bb12 - ret %struct.List* null + ret ptr null bb1.i: ; preds = %bb12 - ret %struct.List* null + ret ptr null bb14: ; preds = %generate_patient.exit, %entry - ret %struct.List* undef + ret ptr undef } diff --git a/llvm/test/CodeGen/Thumb2/2009-08-06-SpDecBug.ll b/llvm/test/CodeGen/Thumb2/2009-08-06-SpDecBug.ll index a451321838e7c8..0a315a9822e8d5 100644 --- a/llvm/test/CodeGen/Thumb2/2009-08-06-SpDecBug.ll +++ b/llvm/test/CodeGen/Thumb2/2009-08-06-SpDecBug.ll @@ -2,7 +2,7 @@ ; PR4659 ; PR4682 -define hidden i32 @__gcov_execlp(i8* %path, i8* %arg, ...) nounwind { +define hidden i32 @__gcov_execlp(ptr %path, ptr %arg, ...) nounwind { entry: ; CHECK-LABEL: __gcov_execlp: ; CHECK: sub sp, #8 @@ -13,20 +13,20 @@ entry: ; CHECK-NOT: mov sp, r7 ; CHECK: add sp, #8 call void @__gcov_flush() nounwind - call void @llvm.va_start(i8* null) + call void @llvm.va_start(ptr 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 ; [#uses=1] - %1 = call i32 @execvp(i8* %path, i8** %0) nounwind ; [#uses=1] + %0 = alloca ptr, i32 undef, align 4 ; [#uses=1] + %1 = call i32 @execvp(ptr %path, ptr %0) nounwind ; [#uses=1] ret i32 %1 } declare hidden void @__gcov_flush() -declare i32 @execvp(i8*, i8**) nounwind +declare i32 @execvp(ptr, ptr) nounwind -declare void @llvm.va_start(i8*) nounwind +declare void @llvm.va_start(ptr) nounwind diff --git a/llvm/test/CodeGen/Thumb2/2009-08-07-CoalescerBug.ll b/llvm/test/CodeGen/Thumb2/2009-08-07-CoalescerBug.ll index 93f5a0f6c41fde..767f2f0cb88920 100644 --- a/llvm/test/CodeGen/Thumb2/2009-08-07-CoalescerBug.ll +++ b/llvm/test/CodeGen/Thumb2/2009-08-07-CoalescerBug.ll @@ -1,16 +1,16 @@ ; RUN: llc < %s -mtriple=armv7-eabi -mattr=+vfp2 ; PR4686 - %a = type { i32 (...)** } + %a = type { ptr } %b = type { %a } %c = type { float, float, float, float } -declare arm_aapcs_vfpcc float @bar(%c*) +declare arm_aapcs_vfpcc float @bar(ptr) -define arm_aapcs_vfpcc void @foo(%b* %x, %c* %y) { +define arm_aapcs_vfpcc void @foo(ptr %x, ptr %y) { entry: - %0 = call arm_aapcs_vfpcc float @bar(%c* %y) ; [#uses=0] + %0 = call arm_aapcs_vfpcc float @bar(ptr %y) ; [#uses=0] %1 = fadd float undef, undef ; [#uses=1] - store float %1, float* undef, align 8 + store float %1, ptr undef, align 8 ret void } diff --git a/llvm/test/CodeGen/Thumb2/2009-08-07-NeonFPBug.ll b/llvm/test/CodeGen/Thumb2/2009-08-07-NeonFPBug.ll index 5480868d7a6685..0f866c35938002 100644 --- a/llvm/test/CodeGen/Thumb2/2009-08-07-NeonFPBug.ll +++ b/llvm/test/CodeGen/Thumb2/2009-08-07-NeonFPBug.ll @@ -1,44 +1,43 @@ ; 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.FILE = type { ptr, i32, i32, i16, i16, %struct.__sbuf, i32, ptr, ptr, ptr, ptr, ptr, %struct.__sbuf, ptr, 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.__sbuf = type { ptr, 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 } + %struct.backing_store_info = type { ptr, ptr, ptr, ptr, [64 x i8] } + %struct.jpeg_color_deconverter = type { ptr, ptr } + %struct.jpeg_color_quantizer = type { ptr, ptr, ptr, ptr } + %struct.jpeg_common_struct = type { ptr, ptr, ptr, 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, ptr, ptr } + %struct.jpeg_d_coef_controller = type { ptr, ptr, ptr, ptr, ptr } + %struct.jpeg_d_main_controller = type { ptr, ptr } + %struct.jpeg_d_post_controller = type { ptr, ptr } + %struct.jpeg_decomp_master = type { ptr, ptr, i32 } + %struct.jpeg_decompress_struct = type { ptr, ptr, ptr, i32, i32, ptr, 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, ptr, i32, i32, i32, i32, i32, ptr, [4 x ptr], [4 x ptr], [4 x ptr], i32, ptr, i32, i32, [16 x i8], [16 x i8], [16 x i8], i32, i32, i8, i16, i16, i32, i8, i32, i32, i32, i32, i32, ptr, i32, [4 x ptr], i32, i32, i32, [10 x i32], i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr } + %struct.jpeg_entropy_decoder = type { ptr, ptr } + %struct.jpeg_error_mgr = type { ptr, ptr, ptr, ptr, ptr, i32, %struct.anon, i32, i32, ptr, i32, ptr, i32, i32 } + %struct.jpeg_input_controller = type { ptr, ptr, ptr, ptr, i32, i32 } + %struct.jpeg_inverse_dct = type { ptr, [10 x ptr] } + %struct.jpeg_marker_reader = type { ptr, ptr, ptr, ptr, [16 x ptr], i32, i32, i32, i32 } + %struct.jpeg_memory_mgr = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32 } + %struct.jpeg_progress_mgr = type { ptr, i32, i32, i32, i32 } + %struct.jpeg_source_mgr = type { ptr, i32, ptr, ptr, ptr, ptr, ptr } + %struct.jpeg_upsampler = type { ptr, ptr, i32 } + %struct.jvirt_barray_control = type { ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, %struct.backing_store_info } + %struct.jvirt_sarray_control = type { ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, %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 { +define void @jpeg_idct_float(ptr nocapture %cinfo, ptr nocapture %compptr, ptr nocapture %coef_block, ptr nocapture %output_buf, i32 %output_col) nounwind { entry: br label %bb bb: ; preds = %bb, %entry - %0 = load float, float* undef, align 4 ; [#uses=1] + %0 = load float, ptr undef, align 4 ; [#uses=1] %1 = fmul float undef, %0 ; [#uses=2] %tmp73 = add i32 0, 224 ; [#uses=1] - %scevgep74 = getelementptr i8, i8* null, i32 %tmp73 ; [#uses=1] - %scevgep7475 = bitcast i8* %scevgep74 to float* ; [#uses=1] - %2 = load float, float* null, align 4 ; [#uses=1] + %scevgep74 = getelementptr i8, ptr null, i32 %tmp73 ; [#uses=1] + %2 = load float, ptr null, align 4 ; [#uses=1] %3 = fmul float 0.000000e+00, %2 ; [#uses=2] %4 = fadd float %1, %3 ; [#uses=1] %5 = fsub float %1, %3 ; [#uses=2] @@ -51,7 +50,7 @@ bb: ; preds = %bb, %entry %12 = sitofp i16 undef to float ; [#uses=1] %13 = fmul float %12, 0.000000e+00 ; [#uses=2] %14 = sitofp i16 undef to float ; [#uses=1] - %15 = load float, float* %scevgep7475, align 4 ; [#uses=1] + %15 = load float, ptr %scevgep74, align 4 ; [#uses=1] %16 = fmul float %14, %15 ; [#uses=2] %17 = fadd float undef, undef ; [#uses=2] %18 = fadd float %13, %16 ; [#uses=2] @@ -67,14 +66,14 @@ bb: ; preds = %bb, %entry %28 = fsub float %22, %27 ; [#uses=2] %29 = fadd float %25, %28 ; [#uses=1] %30 = fadd float undef, %20 ; [#uses=1] - store float %30, float* undef, align 4 + store float %30, ptr undef, align 4 %31 = fadd float %10, %27 ; [#uses=1] - store float %31, float* undef, align 4 + store float %31, ptr undef, align 4 %32 = fsub float %10, %27 ; [#uses=1] - store float %32, float* undef, align 4 + store float %32, ptr undef, align 4 %33 = fadd float %11, %28 ; [#uses=1] - store float %33, float* undef, align 4 + store float %33, ptr undef, align 4 %34 = fsub float %9, %29 ; [#uses=1] - store float %34, float* undef, align 4 + store float %34, ptr undef, align 4 br label %bb } diff --git a/llvm/test/CodeGen/Thumb2/2009-08-08-ScavengerAssert.ll b/llvm/test/CodeGen/Thumb2/2009-08-08-ScavengerAssert.ll index e3c23ac025f4c4..f6593721bed996 100644 --- a/llvm/test/CodeGen/Thumb2/2009-08-08-ScavengerAssert.ll +++ b/llvm/test/CodeGen/Thumb2/2009-08-08-ScavengerAssert.ll @@ -1,7 +1,7 @@ ; RUN: llc < %s -mtriple=armv7-eabi -mattr=+vfp2 ; PR4686 -@g_d = external global double ; [#uses=1] +@g_d = external global double ; [#uses=1] define void @foo(float %yIncr) { entry: @@ -10,7 +10,7 @@ entry: bb: ; preds = %entry %0 = call arm_aapcs_vfpcc float @bar() ; [#uses=1] %1 = fpext float %0 to double ; [#uses=1] - store double %1, double* @g_d, align 8 + store double %1, ptr @g_d, align 8 br label %bb4 bb4: ; preds = %bb, %entry diff --git a/llvm/test/CodeGen/Thumb2/2009-08-10-ISelBug.ll b/llvm/test/CodeGen/Thumb2/2009-08-10-ISelBug.ll index 2bbed1beae1574..4871a00bc874f8 100644 --- a/llvm/test/CodeGen/Thumb2/2009-08-10-ISelBug.ll +++ b/llvm/test/CodeGen/Thumb2/2009-08-10-ISelBug.ll @@ -2,12 +2,12 @@ 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 ; [#uses=1] + store i32 undef, ptr undef, align 4 + %0 = load ptr, ptr undef, align 4 ; [#uses=1] + %1 = load i8, ptr undef, align 1 ; [#uses=1] %2 = zext i8 %1 to i32 ; [#uses=1] - %3 = getelementptr [4 x i8], [4 x i8]* %0, i32 %v0, i32 0 ; [#uses=1] - %4 = load i8, i8* %3, align 1 ; [#uses=1] + %3 = getelementptr [4 x i8], ptr %0, i32 %v0, i32 0 ; [#uses=1] + %4 = load i8, ptr %3, align 1 ; [#uses=1] %5 = zext i8 %4 to i32 ; [#uses=1] %6 = sub i32 %5, %2 ; [#uses=1] %7 = sitofp i32 %6 to float ; [#uses=1] diff --git a/llvm/test/CodeGen/Thumb2/2009-08-21-PostRAKill4.ll b/llvm/test/CodeGen/Thumb2/2009-08-21-PostRAKill4.ll index ff6375d52f64e8..4c54e308ea085b 100644 --- a/llvm/test/CodeGen/Thumb2/2009-08-21-PostRAKill4.ll +++ b/llvm/test/CodeGen/Thumb2/2009-08-21-PostRAKill4.ll @@ -4,23 +4,23 @@ 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] +@.str = external constant [36 x i8], align 1 ; [#uses=0] +@.str1 = external constant [31 x i8], align 1 ; [#uses=1] +@.str2 = external constant [4 x i8], align 1 ; [#uses=1] declare i32 @getUnknown(i32, ...) nounwind -declare void @llvm.va_start(i8*) nounwind +declare void @llvm.va_start(ptr) nounwind -declare void @llvm.va_end(i8*) nounwind +declare void @llvm.va_end(ptr) nounwind -declare i32 @printf(i8* nocapture, ...) nounwind +declare i32 @printf(ptr 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 ; [#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 ; [#uses=0] + %0 = tail call i32 (ptr, ...) @printf(ptr @.str1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1) nounwind ; [#uses=0] + %1 = tail call i32 (ptr, ...) @printf(ptr @.str1, i32 -128, i32 116, i32 116, i32 -3852, i32 -31232, i32 -1708916736) nounwind ; [#uses=0] %2 = tail call i32 (i32, ...) @getUnknown(i32 undef, i32 116, i32 116, i32 -3852, i32 -31232, i32 30556, i32 -1708916736) nounwind ; [#uses=1] - %3 = tail call i32 (i8*, ...) @printf(i8* getelementptr ([4 x i8], [4 x i8]* @.str2, i32 0, i32 0), i32 %2) nounwind ; [#uses=0] + %3 = tail call i32 (ptr, ...) @printf(ptr @.str2, i32 %2) nounwind ; [#uses=0] ret i32 0 } diff --git a/llvm/test/CodeGen/Thumb2/2009-09-01-PostRAProlog.ll b/llvm/test/CodeGen/Thumb2/2009-09-01-PostRAProlog.ll index ee1f03e2c428db..b03c120d399bc6 100644 --- a/llvm/test/CodeGen/Thumb2/2009-09-01-PostRAProlog.ll +++ b/llvm/test/CodeGen/Thumb2/2009-09-01-PostRAProlog.ll @@ -3,59 +3,59 @@ 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 ; [#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 ; [#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 ; [#uses=9] -@hits = internal global i64 0 ; [#uses=8] -@posed = internal global i64 0 ; [#uses=7] -@ht = internal global i32* null ; [#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] +@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]] ; [#uses=3] +@nodes = internal global i64 0 ; [#uses=4] +@.str = private constant [9 x i8] c"##-<=>+#\00", align 1 ; [#uses=2] +@.str1 = private constant [6 x i8] c"%c%d\0A\00", align 1 ; [#uses=1] +@.str2 = private constant [16 x i8] c"Fhourstones 2.0\00", align 1 ; [#uses=1] +@.str3 = private constant [54 x i8] c"Using %d transposition table entries with %d probes.\0A\00", align 1 ; [#uses=1] +@.str4 = private constant [31 x i8] c"Solving %d-ply position after \00", align 1 ; [#uses=1] +@.str5 = private constant [7 x i8] c" . . .\00", align 1 ; [#uses=1] +@.str6 = private constant [28 x i8] c"score = %d (%c) work = %d\0A\00", align 1 ; [#uses=1] +@.str7 = private constant [36 x i8] c"%lu pos / %lu msec = %.1f Kpos/sec\0A\00", align 1 ; [#uses=1] +@plycnt = internal global i32 0 ; [#uses=21] +@dias = internal global [19 x i32] zeroinitializer ; [#uses=43] +@columns = internal global [128 x i32] zeroinitializer ; [#uses=18] +@height = internal global [128 x i32] zeroinitializer ; [#uses=21] +@rows = internal global [8 x i32] zeroinitializer ; [#uses=20] +@colthr = internal global [128 x i32] zeroinitializer ; [#uses=5] +@moves = internal global [44 x i32] zeroinitializer ; [#uses=9] +@.str8 = private constant [3 x i8] c"%d\00", align 1 ; [#uses=1] +@he = internal global ptr null ; [#uses=9] +@hits = internal global i64 0 ; [#uses=8] +@posed = internal global i64 0 ; [#uses=7] +@ht = internal global ptr null ; [#uses=5] +@.str16 = private constant [19 x i8] c"store rate = %.3f\0A\00", align 1 ; [#uses=1] +@.str117 = private constant [45 x i8] c"- %5.3f < %5.3f = %5.3f > %5.3f + %5.3f\0A\00", align 1 ; [#uses=1] +@.str218 = private constant [6 x i8] c"%7d%c\00", align 1 ; [#uses=1] +@.str319 = private constant [30 x i8] c"Failed to allocate %u bytes.\0A\00", align 1 ; [#uses=1] -declare i32 @puts(i8* nocapture) nounwind +declare i32 @puts(ptr 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 ; [#uses=1] + %0 = load i32, ptr getelementptr inbounds ([128 x i32], ptr @columns, i32 0, i32 1), align 4 ; [#uses=1] %1 = shl i32 %0, 7 ; [#uses=1] - %2 = load i32, i32* getelementptr inbounds ([128 x i32], [128 x i32]* @columns, i32 0, i32 2), align 4 ; [#uses=1] + %2 = load i32, ptr getelementptr inbounds ([128 x i32], ptr @columns, i32 0, i32 2), align 4 ; [#uses=1] %3 = or i32 %1, %2 ; [#uses=1] %4 = shl i32 %3, 7 ; [#uses=1] - %5 = load i32, i32* getelementptr inbounds ([128 x i32], [128 x i32]* @columns, i32 0, i32 3), align 4 ; [#uses=1] + %5 = load i32, ptr getelementptr inbounds ([128 x i32], ptr @columns, i32 0, i32 3), align 4 ; [#uses=1] %6 = or i32 %4, %5 ; [#uses=3] - %7 = load i32, i32* getelementptr inbounds ([128 x i32], [128 x i32]* @columns, i32 0, i32 7), align 4 ; [#uses=1] + %7 = load i32, ptr getelementptr inbounds ([128 x i32], ptr @columns, i32 0, i32 7), align 4 ; [#uses=1] %8 = shl i32 %7, 7 ; [#uses=1] - %9 = load i32, i32* getelementptr inbounds ([128 x i32], [128 x i32]* @columns, i32 0, i32 6), align 4 ; [#uses=1] + %9 = load i32, ptr getelementptr inbounds ([128 x i32], ptr @columns, i32 0, i32 6), align 4 ; [#uses=1] %10 = or i32 %8, %9 ; [#uses=1] %11 = shl i32 %10, 7 ; [#uses=1] - %12 = load i32, i32* getelementptr inbounds ([128 x i32], [128 x i32]* @columns, i32 0, i32 5), align 4 ; [#uses=1] + %12 = load i32, ptr getelementptr inbounds ([128 x i32], ptr @columns, i32 0, i32 5), align 4 ; [#uses=1] %13 = or i32 %11, %12 ; [#uses=3] %14 = icmp ugt i32 %6, %13 ; [#uses=2] %.pn2.in.i = select i1 %14, i32 %6, i32 %13 ; [#uses=1] %.pn1.in.i = select i1 %14, i32 %13, i32 %6 ; [#uses=1] %.pn2.i = shl i32 %.pn2.in.i, 7 ; [#uses=1] - %.pn3.i = load i32, i32* getelementptr inbounds ([128 x i32], [128 x i32]* @columns, i32 0, i32 4) ; [#uses=1] + %.pn3.i = load i32, ptr getelementptr inbounds ([128 x i32], ptr @columns, i32 0, i32 4) ; [#uses=1] %.pn.in.in.i = or i32 %.pn2.i, %.pn3.i ; [#uses=1] %.pn.in.i = zext i32 %.pn.in.in.i to i64 ; [#uses=1] %.pn.i = shl i64 %.pn.in.i, 21 ; [#uses=1] @@ -67,19 +67,19 @@ entry: %18 = trunc i64 %17 to i32 ; [#uses=1] %19 = urem i32 %16, 179 ; [#uses=1] %20 = or i32 %19, 131072 ; [#uses=1] - %21 = load i32*, i32** @ht, align 4 ; [#uses=1] + %21 = load ptr, ptr @ht, align 4 ; [#uses=1] br label %bb5 bb: ; preds = %bb5 - %22 = getelementptr inbounds i32, i32* %21, i32 %x.0 ; [#uses=1] - %23 = load i32, i32* %22, align 4 ; [#uses=1] + %22 = getelementptr inbounds i32, ptr %21, i32 %x.0 ; [#uses=1] + %23 = load i32, ptr %22, align 4 ; [#uses=1] %24 = icmp eq i32 %23, %16 ; [#uses=1] br i1 %24, label %bb1, label %bb2 bb1: ; preds = %bb - %25 = load i8*, i8** @he, align 4 ; [#uses=1] - %26 = getelementptr inbounds i8, i8* %25, i32 %x.0 ; [#uses=1] - %27 = load i8, i8* %26, align 1 ; [#uses=1] + %25 = load ptr, ptr @he, align 4 ; [#uses=1] + %26 = getelementptr inbounds i8, ptr %25, i32 %x.0 ; [#uses=1] + %27 = load i8, ptr %26, align 1 ; [#uses=1] %28 = sext i8 %27 to i32 ; [#uses=1] ret i32 %28 @@ -101,4 +101,4 @@ bb7: ; preds = %bb5 ret i32 -128 } -declare noalias i8* @calloc(i32, i32) nounwind +declare noalias ptr @calloc(i32, i32) nounwind diff --git a/llvm/test/CodeGen/Thumb2/2009-10-15-ITBlockBranch.ll b/llvm/test/CodeGen/Thumb2/2009-10-15-ITBlockBranch.ll index 04d46e60d7dbf4..1cefa32b65bc42 100644 --- a/llvm/test/CodeGen/Thumb2/2009-10-15-ITBlockBranch.ll +++ b/llvm/test/CodeGen/Thumb2/2009-10-15-ITBlockBranch.ll @@ -2,26 +2,26 @@ ; RUN: llc < %s -mtriple=thumbv7-eabi -mcpu=cortex-a8 -float-abi=hard -regalloc=basic | FileCheck %s ; PR5204 -%"struct.__gnu_cxx::__normal_iterator, std::allocator > >" = type { i8* } +%"struct.__gnu_cxx::__normal_iterator, std::allocator > >" = type { ptr } %"struct.__gnu_cxx::new_allocator" = type <{ i8 }> %"struct.std::basic_string,std::allocator >" = type { %"struct.__gnu_cxx::__normal_iterator, std::allocator > >" } %"struct.std::basic_string,std::allocator >::_Rep" = type { %"struct.std::basic_string,std::allocator >::_Rep_base" } %"struct.std::basic_string,std::allocator >::_Rep_base" = type { i32, i32, i32 } -define weak arm_aapcs_vfpcc i32 @_ZNKSs7compareERKSs(%"struct.std::basic_string,std::allocator >"* %this, %"struct.std::basic_string,std::allocator >"* %__str) { +define weak arm_aapcs_vfpcc i32 @_ZNKSs7compareERKSs(ptr %this, ptr %__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,std::allocator >"* %this) ; [#uses=3] - %1 = tail call arm_aapcs_vfpcc i32 @_ZNKSs4sizeEv(%"struct.std::basic_string,std::allocator >"* %__str) ; [#uses=3] + %0 = tail call arm_aapcs_vfpcc i32 @_ZNKSs4sizeEv(ptr %this) ; [#uses=3] + %1 = tail call arm_aapcs_vfpcc i32 @_ZNKSs4sizeEv(ptr %__str) ; [#uses=3] %2 = icmp ult i32 %1, %0 ; [#uses=1] %3 = select i1 %2, i32 %1, i32 %0 ; [#uses=1] - %4 = tail call arm_aapcs_vfpcc i8* @_ZNKSs7_M_dataEv(%"struct.std::basic_string,std::allocator >"* %this) ; [#uses=1] - %5 = tail call arm_aapcs_vfpcc i8* @_ZNKSs4dataEv(%"struct.std::basic_string,std::allocator >"* %__str) ; [#uses=1] - %6 = tail call arm_aapcs_vfpcc i32 @memcmp(i8* %4, i8* %5, i32 %3) nounwind readonly ; [#uses=2] + %4 = tail call arm_aapcs_vfpcc ptr @_ZNKSs7_M_dataEv(ptr %this) ; [#uses=1] + %5 = tail call arm_aapcs_vfpcc ptr @_ZNKSs4dataEv(ptr %__str) ; [#uses=1] + %6 = tail call arm_aapcs_vfpcc i32 @memcmp(ptr %4, ptr %5, i32 %3) nounwind readonly ; [#uses=2] %7 = icmp eq i32 %6, 0 ; [#uses=1] br i1 %7, label %bb, label %bb1 @@ -33,10 +33,10 @@ bb1: ; preds = %entry ret i32 %6 } -declare arm_aapcs_vfpcc i32 @memcmp(i8* nocapture, i8* nocapture, i32) nounwind readonly +declare arm_aapcs_vfpcc i32 @memcmp(ptr nocapture, ptr nocapture, i32) nounwind readonly -declare arm_aapcs_vfpcc i32 @_ZNKSs4sizeEv(%"struct.std::basic_string,std::allocator >"* %this) +declare arm_aapcs_vfpcc i32 @_ZNKSs4sizeEv(ptr %this) -declare arm_aapcs_vfpcc i8* @_ZNKSs7_M_dataEv(%"struct.std::basic_string,std::allocator >"* %this) +declare arm_aapcs_vfpcc ptr @_ZNKSs7_M_dataEv(ptr %this) -declare arm_aapcs_vfpcc i8* @_ZNKSs4dataEv(%"struct.std::basic_string,std::allocator >"* %this) +declare arm_aapcs_vfpcc ptr @_ZNKSs4dataEv(ptr %this) diff --git a/llvm/test/CodeGen/Thumb2/2009-11-11-ScavengerAssert.ll b/llvm/test/CodeGen/Thumb2/2009-11-11-ScavengerAssert.ll index e283cb3434cc12..a42a2a3fb8289f 100644 --- a/llvm/test/CodeGen/Thumb2/2009-11-11-ScavengerAssert.ll +++ b/llvm/test/CodeGen/Thumb2/2009-11-11-ScavengerAssert.ll @@ -1,13 +1,13 @@ ; RUN: llc < %s -mtriple=thumbv7-apple-darwin10 -%struct.OP = type { %struct.OP*, %struct.OP*, %struct.OP* ()*, i32, i16, i16, i8, i8 } -%struct.SV = type { i8*, i32, i32 } +%struct.OP = type { ptr, ptr, ptr, i32, i16, i16, i8, i8 } +%struct.SV = type { ptr, i32, i32 } -declare void @Perl_mg_set(%struct.SV*) nounwind +declare void @Perl_mg_set(ptr) nounwind -define %struct.OP* @Perl_pp_complement() nounwind { +define ptr @Perl_pp_complement() nounwind { entry: - %0 = load %struct.SV*, %struct.SV** null, align 4 ; <%struct.SV*> [#uses=2] + %0 = load ptr, ptr null, align 4 ; [#uses=2] br i1 undef, label %bb21, label %bb5 bb5: ; preds = %entry @@ -17,54 +17,53 @@ bb6: ; preds = %bb5 br i1 undef, label %bb8, label %bb7 bb7: ; preds = %bb6 - %1 = getelementptr inbounds %struct.SV, %struct.SV* %0, i32 0, i32 0 ; [#uses=1] - %2 = load i8*, i8** %1, align 4 ; [#uses=1] - %3 = getelementptr inbounds i8, i8* %2, i32 12 ; [#uses=1] - %4 = bitcast i8* %3 to i32* ; [#uses=1] - %5 = load i32, i32* %4, align 4 ; [#uses=1] - %storemerge5 = xor i32 %5, -1 ; [#uses=1] - call void @Perl_sv_setiv(%struct.SV* undef, i32 %storemerge5) nounwind - %6 = getelementptr inbounds %struct.SV, %struct.SV* undef, i32 0, i32 2 ; [#uses=1] - %7 = load i32, i32* %6, align 4 ; [#uses=1] - %8 = and i32 %7, 16384 ; [#uses=1] - %9 = icmp eq i32 %8, 0 ; [#uses=1] - br i1 %9, label %bb12, label %bb11 + %1 = getelementptr inbounds %struct.SV, ptr %0, i32 0, i32 0 ; [#uses=1] + %2 = load ptr, ptr %1, align 4 ; [#uses=1] + %3 = getelementptr inbounds i8, ptr %2, i32 12 ; [#uses=1] + %4 = load i32, ptr %3, align 4 ; [#uses=1] + %storemerge5 = xor i32 %4, -1 ; [#uses=1] + call void @Perl_sv_setiv(ptr undef, i32 %storemerge5) nounwind + %5 = getelementptr inbounds %struct.SV, ptr undef, i32 0, i32 2 ; [#uses=1] + %6 = load i32, ptr %5, align 4 ; [#uses=1] + %7 = and i32 %6, 16384 ; [#uses=1] + %8 = icmp eq i32 %7, 0 ; [#uses=1] + br i1 %8, label %bb12, label %bb11 bb8: ; preds = %bb6 unreachable bb11: ; preds = %bb7 - call void @Perl_mg_set(%struct.SV* undef) nounwind + call void @Perl_mg_set(ptr undef) nounwind br label %bb12 bb12: ; preds = %bb11, %bb7 - store %struct.SV* undef, %struct.SV** null, align 4 + store ptr undef, ptr null, align 4 br label %bb44 bb13: ; preds = %bb5 - %10 = call i32 @Perl_sv_2uv(%struct.SV* %0) nounwind ; [#uses=0] + %9 = call i32 @Perl_sv_2uv(ptr %0) nounwind ; [#uses=0] br i1 undef, label %bb.i, label %bb1.i bb.i: ; preds = %bb13 - call void @Perl_sv_setiv(%struct.SV* undef, i32 undef) nounwind + call void @Perl_sv_setiv(ptr undef, i32 undef) nounwind br label %Perl_sv_setuv.exit bb1.i: ; preds = %bb13 br label %Perl_sv_setuv.exit Perl_sv_setuv.exit: ; preds = %bb1.i, %bb.i - %11 = getelementptr inbounds %struct.SV, %struct.SV* undef, i32 0, i32 2 ; [#uses=1] - %12 = load i32, i32* %11, align 4 ; [#uses=1] - %13 = and i32 %12, 16384 ; [#uses=1] - %14 = icmp eq i32 %13, 0 ; [#uses=1] - br i1 %14, label %bb20, label %bb19 + %10 = getelementptr inbounds %struct.SV, ptr undef, i32 0, i32 2 ; [#uses=1] + %11 = load i32, ptr %10, align 4 ; [#uses=1] + %12 = and i32 %11, 16384 ; [#uses=1] + %13 = icmp eq i32 %12, 0 ; [#uses=1] + br i1 %13, label %bb20, label %bb19 bb19: ; preds = %Perl_sv_setuv.exit - call void @Perl_mg_set(%struct.SV* undef) nounwind + call void @Perl_mg_set(ptr undef) nounwind br label %bb20 bb20: ; preds = %bb19, %Perl_sv_setuv.exit - store %struct.SV* undef, %struct.SV** null, align 4 + store ptr undef, ptr null, align 4 br label %bb44 bb21: ; preds = %entry @@ -77,9 +76,9 @@ bb23: ; preds = %bb21 unreachable bb44: ; preds = %bb20, %bb12 - ret %struct.OP* undef + ret ptr undef } -declare void @Perl_sv_setiv(%struct.SV*, i32) nounwind +declare void @Perl_sv_setiv(ptr, i32) nounwind -declare i32 @Perl_sv_2uv(%struct.SV*) nounwind +declare i32 @Perl_sv_2uv(ptr) nounwind diff --git a/llvm/test/CodeGen/Thumb2/2009-11-13-STRDBug.ll b/llvm/test/CodeGen/Thumb2/2009-11-13-STRDBug.ll index 0c9fa5efa0bbb1..a98a99430d12ed 100644 --- a/llvm/test/CodeGen/Thumb2/2009-11-13-STRDBug.ll +++ b/llvm/test/CodeGen/Thumb2/2009-11-13-STRDBug.ll @@ -1,20 +1,20 @@ ; RUN: llc < %s -mtriple=thumbv7-apple-darwin10 ; rdar://7394794 -define void @lshift_double(i64 %l1, i64 %h1, i64 %count, i32 %prec, i64* nocapture %lv, i64* nocapture %hv, i32 %arith) nounwind { +define void @lshift_double(i64 %l1, i64 %h1, i64 %count, i32 %prec, ptr nocapture %lv, ptr nocapture %hv, i32 %arith) nounwind { entry: %..i = select i1 false, i64 0, i64 0 ; [#uses=1] br i1 undef, label %bb11.i, label %bb6.i bb6.i: ; preds = %entry %0 = lshr i64 %h1, 0 ; [#uses=1] - store i64 %0, i64* %hv, align 4 + store i64 %0, ptr %hv, align 4 %1 = lshr i64 %l1, 0 ; [#uses=1] %2 = or i64 0, %1 ; [#uses=1] - store i64 %2, i64* %lv, align 4 + store i64 %2, ptr %lv, align 4 br label %bb11.i bb11.i: ; preds = %bb6.i, %entry - store i64 %..i, i64* %lv, align 4 + store i64 %..i, ptr %lv, align 4 ret void } diff --git a/llvm/test/CodeGen/Thumb2/2009-12-01-LoopIVUsers.ll b/llvm/test/CodeGen/Thumb2/2009-12-01-LoopIVUsers.ll index b4248b81748d6d..0057242eafb050 100644 --- a/llvm/test/CodeGen/Thumb2/2009-12-01-LoopIVUsers.ll +++ b/llvm/test/CodeGen/Thumb2/2009-12-01-LoopIVUsers.ll @@ -3,7 +3,7 @@ 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" -define void @fred(i32 %three_by_three, i8* %in, double %dt1, i32 %x_size, i32 %y_size, i8* %bp) nounwind { +define void @fred(i32 %three_by_three, ptr %in, double %dt1, i32 %x_size, i32 %y_size, ptr %bp) nounwind { entry: ; -- The loop following the load should only use a single add-literation ; instruction. @@ -12,108 +12,108 @@ entry: ; CHECK: subsections_via_symbols - %three_by_three_addr = alloca i32 ; [#uses=2] - %in_addr = alloca i8* ; [#uses=2] - %dt_addr = alloca float ; [#uses=4] - %x_size_addr = alloca i32 ; [#uses=2] - %y_size_addr = alloca i32 ; [#uses=1] - %bp_addr = alloca i8* ; [#uses=1] - %tmp_image = alloca i8* ; [#uses=0] - %out = alloca i8* ; [#uses=1] - %cp = alloca i8* ; [#uses=0] - %dpt = alloca i8* ; [#uses=4] - %dp = alloca i8* ; [#uses=2] - %ip = alloca i8* ; [#uses=0] - %centre = alloca i32 ; [#uses=0] - %tmp = alloca i32 ; [#uses=0] - %brightness = alloca i32 ; [#uses=0] - %area = alloca i32 ; [#uses=0] - %y = alloca i32 ; [#uses=0] - %x = alloca i32 ; [#uses=2] - %j = alloca i32 ; [#uses=6] - %i = alloca i32 ; [#uses=1] - %mask_size = alloca i32 ; [#uses=5] - %increment = alloca i32 ; [#uses=1] - %n_max = alloca i32 ; [#uses=4] - %temp = alloca float ; [#uses=1] + %three_by_three_addr = alloca i32 ; [#uses=2] + %in_addr = alloca ptr ; [#uses=2] + %dt_addr = alloca float ; [#uses=4] + %x_size_addr = alloca i32 ; [#uses=2] + %y_size_addr = alloca i32 ; [#uses=1] + %bp_addr = alloca ptr ; [#uses=1] + %tmp_image = alloca ptr ; [#uses=0] + %out = alloca ptr ; [#uses=1] + %cp = alloca ptr ; [#uses=0] + %dpt = alloca ptr ; [#uses=4] + %dp = alloca ptr ; [#uses=2] + %ip = alloca ptr ; [#uses=0] + %centre = alloca i32 ; [#uses=0] + %tmp = alloca i32 ; [#uses=0] + %brightness = alloca i32 ; [#uses=0] + %area = alloca i32 ; [#uses=0] + %y = alloca i32 ; [#uses=0] + %x = alloca i32 ; [#uses=2] + %j = alloca i32 ; [#uses=6] + %i = alloca i32 ; [#uses=1] + %mask_size = alloca i32 ; [#uses=5] + %increment = alloca i32 ; [#uses=1] + %n_max = alloca i32 ; [#uses=4] + %temp = alloca float ; [#uses=1] %"alloca point" = bitcast i32 0 to i32 ; [#uses=0] - store i32 %three_by_three, i32* %three_by_three_addr - store i8* %in, i8** %in_addr + store i32 %three_by_three, ptr %three_by_three_addr + store ptr %in, ptr %in_addr %dt = fptrunc double %dt1 to float ; [#uses=1] - store float %dt, float* %dt_addr - store i32 %x_size, i32* %x_size_addr - store i32 %y_size, i32* %y_size_addr - store i8* %bp, i8** %bp_addr - %0 = load i8*, i8** %in_addr, align 4 ; [#uses=1] - store i8* %0, i8** %out, align 4 + store float %dt, ptr %dt_addr + store i32 %x_size, ptr %x_size_addr + store i32 %y_size, ptr %y_size_addr + store ptr %bp, ptr %bp_addr + %0 = load ptr, ptr %in_addr, align 4 ; [#uses=1] + store ptr %0, ptr %out, align 4 %1 = call i32 (...) @foo() nounwind ; [#uses=1] - store i32 %1, i32* %i, align 4 - %2 = load i32, i32* %three_by_three_addr, align 4 ; [#uses=1] + store i32 %1, ptr %i, align 4 + %2 = load i32, ptr %three_by_three_addr, align 4 ; [#uses=1] %3 = icmp eq i32 %2, 0 ; [#uses=1] br i1 %3, label %bb, label %bb2 bb: ; preds = %entry - %4 = load float, float* %dt_addr, align 4 ; [#uses=1] + %4 = load float, ptr %dt_addr, align 4 ; [#uses=1] %5 = fpext float %4 to double ; [#uses=1] %6 = fmul double %5, 1.500000e+00 ; [#uses=1] %7 = fptosi double %6 to i32 ; [#uses=1] %8 = add nsw i32 %7, 1 ; [#uses=1] - store i32 %8, i32* %mask_size, align 4 + store i32 %8, ptr %mask_size, align 4 br label %bb3 bb2: ; preds = %entry - store i32 1, i32* %mask_size, align 4 + store i32 1, ptr %mask_size, align 4 br label %bb3 bb3: ; preds = %bb2, %bb - %9 = load i32, i32* %mask_size, align 4 ; [#uses=1] + %9 = load i32, ptr %mask_size, align 4 ; [#uses=1] %10 = mul i32 %9, 2 ; [#uses=1] %11 = add nsw i32 %10, 1 ; [#uses=1] - store i32 %11, i32* %n_max, align 4 - %12 = load i32, i32* %x_size_addr, align 4 ; [#uses=1] - %13 = load i32, i32* %n_max, align 4 ; [#uses=1] + store i32 %11, ptr %n_max, align 4 + %12 = load i32, ptr %x_size_addr, align 4 ; [#uses=1] + %13 = load i32, ptr %n_max, align 4 ; [#uses=1] %14 = sub i32 %12, %13 ; [#uses=1] - store i32 %14, i32* %increment, align 4 - %15 = load i32, i32* %n_max, align 4 ; [#uses=1] - %16 = load i32, i32* %n_max, align 4 ; [#uses=1] + store i32 %14, ptr %increment, align 4 + %15 = load i32, ptr %n_max, align 4 ; [#uses=1] + %16 = load i32, ptr %n_max, align 4 ; [#uses=1] %17 = mul i32 %15, %16 ; [#uses=1] - %18 = call noalias i8* @malloc(i32 %17) nounwind ; [#uses=1] - store i8* %18, i8** %dp, align 4 - %19 = load i8*, i8** %dp, align 4 ; [#uses=1] - store i8* %19, i8** %dpt, align 4 - %20 = load float, float* %dt_addr, align 4 ; [#uses=1] - %21 = load float, float* %dt_addr, align 4 ; [#uses=1] + %18 = call noalias ptr @malloc(i32 %17) nounwind ; [#uses=1] + store ptr %18, ptr %dp, align 4 + %19 = load ptr, ptr %dp, align 4 ; [#uses=1] + store ptr %19, ptr %dpt, align 4 + %20 = load float, ptr %dt_addr, align 4 ; [#uses=1] + %21 = load float, ptr %dt_addr, align 4 ; [#uses=1] %22 = fmul float %20, %21 ; [#uses=1] %23 = fsub float -0.000000e+00, %22 ; [#uses=1] - store float %23, float* %temp, align 4 - %24 = load i32, i32* %mask_size, align 4 ; [#uses=1] + store float %23, ptr %temp, align 4 + %24 = load i32, ptr %mask_size, align 4 ; [#uses=1] %25 = sub i32 0, %24 ; [#uses=1] - store i32 %25, i32* %j, align 4 + store i32 %25, ptr %j, align 4 br label %bb5 bb4: ; preds = %bb5 - %26 = load i32, i32* %j, align 4 ; [#uses=1] - %27 = load i32, i32* %j, align 4 ; [#uses=1] + %26 = load i32, ptr %j, align 4 ; [#uses=1] + %27 = load i32, ptr %j, align 4 ; [#uses=1] %28 = mul i32 %26, %27 ; [#uses=1] %29 = sitofp i32 %28 to double ; [#uses=1] %30 = fmul double %29, 1.234000e+00 ; [#uses=1] %31 = fptosi double %30 to i32 ; [#uses=1] - store i32 %31, i32* %x, align 4 - %32 = load i32, i32* %x, align 4 ; [#uses=1] + store i32 %31, ptr %x, align 4 + %32 = load i32, ptr %x, align 4 ; [#uses=1] %33 = trunc i32 %32 to i8 ; [#uses=1] - %34 = load i8*, i8** %dpt, align 4 ; [#uses=1] - store i8 %33, i8* %34, align 1 - %35 = load i8*, i8** %dpt, align 4 ; [#uses=1] - %36 = getelementptr inbounds i8, i8* %35, i64 1 ; [#uses=1] - store i8* %36, i8** %dpt, align 4 - %37 = load i32, i32* %j, align 4 ; [#uses=1] + %34 = load ptr, ptr %dpt, align 4 ; [#uses=1] + store i8 %33, ptr %34, align 1 + %35 = load ptr, ptr %dpt, align 4 ; [#uses=1] + %36 = getelementptr inbounds i8, ptr %35, i64 1 ; [#uses=1] + store ptr %36, ptr %dpt, align 4 + %37 = load i32, ptr %j, align 4 ; [#uses=1] %38 = add nsw i32 %37, 1 ; [#uses=1] - store i32 %38, i32* %j, align 4 + store i32 %38, ptr %j, align 4 br label %bb5 bb5: ; preds = %bb4, %bb3 - %39 = load i32, i32* %j, align 4 ; [#uses=1] - %40 = load i32, i32* %mask_size, align 4 ; [#uses=1] + %39 = load i32, ptr %j, align 4 ; [#uses=1] + %40 = load i32, ptr %mask_size, align 4 ; [#uses=1] %41 = icmp sle i32 %39, %40 ; [#uses=1] br i1 %41, label %bb4, label %bb6 @@ -126,4 +126,4 @@ return: ; preds = %bb6 declare i32 @foo(...) -declare noalias i8* @malloc(i32) nounwind +declare noalias ptr @malloc(i32) nounwind diff --git a/llvm/test/CodeGen/Thumb2/2010-01-06-TailDuplicateLabels.ll b/llvm/test/CodeGen/Thumb2/2010-01-06-TailDuplicateLabels.ll index 1b0b91e86cf219..f82e3c150235ea 100644 --- a/llvm/test/CodeGen/Thumb2/2010-01-06-TailDuplicateLabels.ll +++ b/llvm/test/CodeGen/Thumb2/2010-01-06-TailDuplicateLabels.ll @@ -6,84 +6,83 @@ target triple = "thumbv7-apple-darwin10" %struct.PlatformMutex = type { i32, [40 x i8] } %struct.SpinLock = type { %struct.PlatformMutex } -%"struct.WTF::TCMalloc_ThreadCache" = type { i32, %struct._opaque_pthread_t*, i8, [68 x %"struct.WTF::TCMalloc_ThreadCache_FreeList"], i32, i32, %"struct.WTF::TCMalloc_ThreadCache"*, %"struct.WTF::TCMalloc_ThreadCache"* } -%"struct.WTF::TCMalloc_ThreadCache_FreeList" = type { i8*, i16, i16 } -%struct.__darwin_pthread_handler_rec = type { void (i8*)*, i8*, %struct.__darwin_pthread_handler_rec* } -%struct._opaque_pthread_t = type { i32, %struct.__darwin_pthread_handler_rec*, [596 x i8] } - -@_ZN3WTFL8heap_keyE = internal global i32 0 ; [#uses=1] -@_ZN3WTFL10tsd_initedE.b = internal global i1 false ; [#uses=2] -@_ZN3WTFL13pageheap_lockE = internal global %struct.SpinLock { %struct.PlatformMutex { i32 850045863, [40 x i8] zeroinitializer } } ; <%struct.SpinLock*> [#uses=1] -@_ZN3WTFL12thread_heapsE = internal global %"struct.WTF::TCMalloc_ThreadCache"* null ; <%"struct.WTF::TCMalloc_ThreadCache"**> [#uses=1] -@llvm.used = appending global [1 x i8*] [i8* bitcast (%"struct.WTF::TCMalloc_ThreadCache"* ()* @_ZN3WTF20TCMalloc_ThreadCache22CreateCacheIfNecessaryEv to i8*)], section "llvm.metadata" ; <[1 x i8*]*> [#uses=0] - -define %"struct.WTF::TCMalloc_ThreadCache"* @_ZN3WTF20TCMalloc_ThreadCache22CreateCacheIfNecessaryEv() nounwind { +%"struct.WTF::TCMalloc_ThreadCache" = type { i32, ptr, i8, [68 x %"struct.WTF::TCMalloc_ThreadCache_FreeList"], i32, i32, ptr, ptr } +%"struct.WTF::TCMalloc_ThreadCache_FreeList" = type { ptr, i16, i16 } +%struct.__darwin_pthread_handler_rec = type { ptr, ptr, ptr } +%struct._opaque_pthread_t = type { i32, ptr, [596 x i8] } + +@_ZN3WTFL8heap_keyE = internal global i32 0 ; [#uses=1] +@_ZN3WTFL10tsd_initedE.b = internal global i1 false ; [#uses=2] +@_ZN3WTFL13pageheap_lockE = internal global %struct.SpinLock { %struct.PlatformMutex { i32 850045863, [40 x i8] zeroinitializer } } ; [#uses=1] +@_ZN3WTFL12thread_heapsE = internal global ptr null ; [#uses=1] +@llvm.used = appending global [1 x ptr] [ptr @_ZN3WTF20TCMalloc_ThreadCache22CreateCacheIfNecessaryEv], section "llvm.metadata" ; [#uses=0] + +define ptr @_ZN3WTF20TCMalloc_ThreadCache22CreateCacheIfNecessaryEv() nounwind { entry: - %0 = tail call i32 @pthread_mutex_lock(%struct.PlatformMutex* getelementptr inbounds (%struct.SpinLock, %struct.SpinLock* @_ZN3WTFL13pageheap_lockE, i32 0, i32 0)) nounwind - %.b24 = load i1, i1* @_ZN3WTFL10tsd_initedE.b, align 4 ; [#uses=1] + %0 = tail call i32 @pthread_mutex_lock(ptr @_ZN3WTFL13pageheap_lockE) nounwind + %.b24 = load i1, ptr @_ZN3WTFL10tsd_initedE.b, align 4 ; [#uses=1] br i1 %.b24, label %bb5, label %bb6 bb5: ; preds = %entry - %1 = tail call %struct._opaque_pthread_t* @pthread_self() nounwind + %1 = tail call ptr @pthread_self() nounwind br label %bb6 bb6: ; preds = %bb5, %entry - %me.0 = phi %struct._opaque_pthread_t* [ %1, %bb5 ], [ null, %entry ] ; <%struct._opaque_pthread_t*> [#uses=2] + %me.0 = phi ptr [ %1, %bb5 ], [ null, %entry ] ; [#uses=2] br label %bb11 bb7: ; preds = %bb11 - %2 = getelementptr inbounds %"struct.WTF::TCMalloc_ThreadCache", %"struct.WTF::TCMalloc_ThreadCache"* %h.0, i32 0, i32 1 - %3 = load %struct._opaque_pthread_t*, %struct._opaque_pthread_t** %2, align 4 - %4 = tail call i32 @pthread_equal(%struct._opaque_pthread_t* %3, %struct._opaque_pthread_t* %me.0) nounwind + %2 = getelementptr inbounds %"struct.WTF::TCMalloc_ThreadCache", ptr %h.0, i32 0, i32 1 + %3 = load ptr, ptr %2, align 4 + %4 = tail call i32 @pthread_equal(ptr %3, ptr %me.0) nounwind %5 = icmp eq i32 %4, 0 br i1 %5, label %bb10, label %bb14 bb10: ; preds = %bb7 - %6 = getelementptr inbounds %"struct.WTF::TCMalloc_ThreadCache", %"struct.WTF::TCMalloc_ThreadCache"* %h.0, i32 0, i32 6 + %6 = getelementptr inbounds %"struct.WTF::TCMalloc_ThreadCache", ptr %h.0, i32 0, i32 6 br label %bb11 bb11: ; preds = %bb10, %bb6 - %h.0.in = phi %"struct.WTF::TCMalloc_ThreadCache"** [ @_ZN3WTFL12thread_heapsE, %bb6 ], [ %6, %bb10 ] ; <%"struct.WTF::TCMalloc_ThreadCache"**> [#uses=1] - %h.0 = load %"struct.WTF::TCMalloc_ThreadCache"*, %"struct.WTF::TCMalloc_ThreadCache"** %h.0.in, align 4 ; <%"struct.WTF::TCMalloc_ThreadCache"*> [#uses=4] - %7 = icmp eq %"struct.WTF::TCMalloc_ThreadCache"* %h.0, null + %h.0.in = phi ptr [ @_ZN3WTFL12thread_heapsE, %bb6 ], [ %6, %bb10 ] ; [#uses=1] + %h.0 = load ptr, ptr %h.0.in, align 4 ; [#uses=4] + %7 = icmp eq ptr %h.0, null br i1 %7, label %bb13, label %bb7 bb13: ; preds = %bb11 - %8 = tail call %"struct.WTF::TCMalloc_ThreadCache"* @_ZN3WTF20TCMalloc_ThreadCache7NewHeapEP17_opaque_pthread_t(%struct._opaque_pthread_t* %me.0) nounwind + %8 = tail call ptr @_ZN3WTF20TCMalloc_ThreadCache7NewHeapEP17_opaque_pthread_t(ptr %me.0) nounwind br label %bb14 bb14: ; preds = %bb13, %bb7 - %heap.1 = phi %"struct.WTF::TCMalloc_ThreadCache"* [ %8, %bb13 ], [ %h.0, %bb7 ] ; <%"struct.WTF::TCMalloc_ThreadCache"*> [#uses=4] - %9 = tail call i32 @pthread_mutex_unlock(%struct.PlatformMutex* getelementptr inbounds (%struct.SpinLock, %struct.SpinLock* @_ZN3WTFL13pageheap_lockE, i32 0, i32 0)) nounwind - %10 = getelementptr inbounds %"struct.WTF::TCMalloc_ThreadCache", %"struct.WTF::TCMalloc_ThreadCache"* %heap.1, i32 0, i32 2 - %11 = load i8, i8* %10, align 4 + %heap.1 = phi ptr [ %8, %bb13 ], [ %h.0, %bb7 ] ; [#uses=4] + %9 = tail call i32 @pthread_mutex_unlock(ptr @_ZN3WTFL13pageheap_lockE) nounwind + %10 = getelementptr inbounds %"struct.WTF::TCMalloc_ThreadCache", ptr %heap.1, i32 0, i32 2 + %11 = load i8, ptr %10, align 4 %toBool15not = icmp eq i8 %11, 0 ; [#uses=1] br i1 %toBool15not, label %bb19, label %bb22 bb19: ; preds = %bb14 - %.b = load i1, i1* @_ZN3WTFL10tsd_initedE.b, align 4 ; [#uses=1] + %.b = load i1, ptr @_ZN3WTFL10tsd_initedE.b, align 4 ; [#uses=1] br i1 %.b, label %bb21, label %bb22 bb21: ; preds = %bb19 - store i8 1, i8* %10, align 4 - %12 = load i32, i32* @_ZN3WTFL8heap_keyE, align 4 - %13 = bitcast %"struct.WTF::TCMalloc_ThreadCache"* %heap.1 to i8* - %14 = tail call i32 @pthread_setspecific(i32 %12, i8* %13) nounwind - ret %"struct.WTF::TCMalloc_ThreadCache"* %heap.1 + store i8 1, ptr %10, align 4 + %12 = load i32, ptr @_ZN3WTFL8heap_keyE, align 4 + %13 = tail call i32 @pthread_setspecific(i32 %12, ptr %heap.1) nounwind + ret ptr %heap.1 bb22: ; preds = %bb19, %bb14 - ret %"struct.WTF::TCMalloc_ThreadCache"* %heap.1 + ret ptr %heap.1 } -declare i32 @pthread_mutex_lock(%struct.PlatformMutex*) +declare i32 @pthread_mutex_lock(ptr) -declare i32 @pthread_mutex_unlock(%struct.PlatformMutex*) +declare i32 @pthread_mutex_unlock(ptr) -declare hidden %"struct.WTF::TCMalloc_ThreadCache"* @_ZN3WTF20TCMalloc_ThreadCache7NewHeapEP17_opaque_pthread_t(%struct._opaque_pthread_t*) nounwind +declare hidden ptr @_ZN3WTF20TCMalloc_ThreadCache7NewHeapEP17_opaque_pthread_t(ptr) nounwind -declare i32 @pthread_setspecific(i32, i8*) +declare i32 @pthread_setspecific(i32, ptr) -declare %struct._opaque_pthread_t* @pthread_self() +declare ptr @pthread_self() -declare i32 @pthread_equal(%struct._opaque_pthread_t*, %struct._opaque_pthread_t*) +declare i32 @pthread_equal(ptr, ptr) diff --git a/llvm/test/CodeGen/Thumb2/2010-01-19-RemovePredicates.ll b/llvm/test/CodeGen/Thumb2/2010-01-19-RemovePredicates.ll index a20d36ba5ed328..a07f1e6610edca 100644 --- a/llvm/test/CodeGen/Thumb2/2010-01-19-RemovePredicates.ll +++ b/llvm/test/CodeGen/Thumb2/2010-01-19-RemovePredicates.ll @@ -6,16 +6,15 @@ 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-n32" target triple = "thumbv7-apple-darwin10" -declare void @etoe53(i16* nocapture, i16* nocapture) nounwind +declare void @etoe53(ptr nocapture, ptr nocapture) nounwind -define void @earith(double* nocapture %value, i32 %icode, double* nocapture %r1, double* nocapture %r2) nounwind { +define void @earith(ptr nocapture %value, i32 %icode, ptr nocapture %r1, ptr nocapture %r2) nounwind { entry: - %v = alloca [6 x i16], align 4 ; <[6 x i16]*> [#uses=1] + %v = alloca [6 x i16], align 4 ; [#uses=1] br i1 undef, label %bb2.i, label %bb5 bb2.i: ; preds = %entry - %0 = bitcast double* %value to i16* ; [#uses=1] - call void @etoe53(i16* null, i16* %0) nounwind + call void @etoe53(ptr null, ptr %value) nounwind ret void bb5: ; preds = %entry @@ -46,8 +45,7 @@ bb35: ; preds = %bb5 unreachable bb46: ; preds = %bb26, %bb10 - %1 = bitcast double* %value to i16* ; [#uses=1] - %v47 = getelementptr inbounds [6 x i16], [6 x i16]* %v, i32 0, i32 0 ; [#uses=1] - call void @etoe53(i16* %v47, i16* %1) nounwind + %v47 = getelementptr inbounds [6 x i16], ptr %v, i32 0, i32 0 ; [#uses=1] + call void @etoe53(ptr %v47, ptr %value) nounwind ret void } diff --git a/llvm/test/CodeGen/Thumb2/2010-02-24-BigStack.ll b/llvm/test/CodeGen/Thumb2/2010-02-24-BigStack.ll index 86e434a3043348..aca29e67155219 100644 --- a/llvm/test/CodeGen/Thumb2/2010-02-24-BigStack.ll +++ b/llvm/test/CodeGen/Thumb2/2010-02-24-BigStack.ll @@ -4,12 +4,12 @@ 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-n32" target triple = "thumbv7-apple-darwin3.0.0-iphoneos" -define void @FindMin(double* %panelTDEL, i8* %dclOfRow, i32 %numRows, i32 %numCols, double* %retMin_RES_TDEL) { +define void @FindMin(ptr %panelTDEL, ptr %dclOfRow, i32 %numRows, i32 %numCols, ptr %retMin_RES_TDEL) { entry: - %panelTDEL.addr = alloca double*, align 4 ; [#uses=1] - %panelResTDEL = alloca [2560 x double], align 4 ; <[2560 x double]*> [#uses=0] - store double* %panelTDEL, double** %panelTDEL.addr - store double* %retMin_RES_TDEL, double** undef - store i32 0, i32* undef + %panelTDEL.addr = alloca ptr, align 4 ; [#uses=1] + %panelResTDEL = alloca [2560 x double], align 4 ; [#uses=0] + store ptr %panelTDEL, ptr %panelTDEL.addr + store ptr %retMin_RES_TDEL, ptr undef + store i32 0, ptr undef unreachable } diff --git a/llvm/test/CodeGen/Thumb2/2010-03-08-addi12-ccout.ll b/llvm/test/CodeGen/Thumb2/2010-03-08-addi12-ccout.ll index 7d19d15f2a3067..53f4f334f17c55 100644 --- a/llvm/test/CodeGen/Thumb2/2010-03-08-addi12-ccout.ll +++ b/llvm/test/CodeGen/Thumb2/2010-03-08-addi12-ccout.ll @@ -1,19 +1,19 @@ ; RUN: llc < %s -mtriple=thumbv7-apple-darwin -@.str41196 = external constant [2 x i8], align 4 ; <[2 x i8]*> [#uses=1] +@.str41196 = external constant [2 x i8], align 4 ; [#uses=1] declare void @syStopraw(i32) nounwind -declare i32 @SyFopen(i8*, i8*) nounwind +declare i32 @SyFopen(ptr, ptr) nounwind -declare i8* @SyFgets(i8*, i32) nounwind +declare ptr @SyFgets(ptr, i32) nounwind -define void @SyHelp(i8* nocapture %topic, i32 %fin) nounwind { +define void @SyHelp(ptr nocapture %topic, i32 %fin) nounwind { entry: - %line = alloca [256 x i8], align 4 ; <[256 x i8]*> [#uses=1] - %secname = alloca [1024 x i8], align 4 ; <[1024 x i8]*> [#uses=0] - %last = alloca [256 x i8], align 4 ; <[256 x i8]*> [#uses=1] - %last2 = alloca [256 x i8], align 4 ; <[256 x i8]*> [#uses=1] + %line = alloca [256 x i8], align 4 ; [#uses=1] + %secname = alloca [1024 x i8], align 4 ; [#uses=0] + %last = alloca [256 x i8], align 4 ; [#uses=1] + %last2 = alloca [256 x i8], align 4 ; [#uses=1] br i1 undef, label %bb, label %bb2 bb: ; preds = %entry @@ -70,7 +70,7 @@ bb163: ; preds = %bb162, %bb161 unreachable bb224: ; preds = %bb162 - %0 = call i32 @SyFopen(i8* undef, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str41196, i32 0, i32 0)) nounwind ; [#uses=2] + %0 = call i32 @SyFopen(ptr undef, ptr @.str41196) nounwind ; [#uses=2] br i1 false, label %bb297, label %bb300 bb297: ; preds = %bb224 @@ -138,8 +138,8 @@ bb345: ; preds = %bb345, %bb339 %4 = phi i8 [ %5, %bb345 ], [ undef, %bb339 ] ; [#uses=0] %indvar670 = phi i32 [ %tmp673, %bb345 ], [ 0, %bb339 ] ; [#uses=1] %tmp673 = add i32 %indvar670, 1 ; [#uses=2] - %scevgep674 = getelementptr [256 x i8], [256 x i8]* %last, i32 0, i32 %tmp673 ; [#uses=1] - %5 = load i8, i8* %scevgep674, align 1 ; [#uses=1] + %scevgep674 = getelementptr [256 x i8], ptr %last, i32 0, i32 %tmp673 ; [#uses=1] + %5 = load i8, ptr %scevgep674, align 1 ; [#uses=1] br i1 undef, label %bb347, label %bb345 bb347: ; preds = %bb345 @@ -166,8 +166,8 @@ bb362: ; preds = %bb361 bb366: ; preds = %bb366, %bb360 %indvar662 = phi i32 [ %tmp665, %bb366 ], [ 0, %bb360 ] ; [#uses=1] %tmp665 = add i32 %indvar662, 1 ; [#uses=2] - %scevgep666 = getelementptr [256 x i8], [256 x i8]* %last2, i32 0, i32 %tmp665 ; [#uses=1] - %6 = load i8, i8* %scevgep666, align 1 ; [#uses=0] + %scevgep666 = getelementptr [256 x i8], ptr %last2, i32 0, i32 %tmp665 ; [#uses=1] + %6 = load i8, ptr %scevgep666, align 1 ; [#uses=0] br i1 false, label %bb368, label %bb366 bb368: ; preds = %bb366 @@ -177,8 +177,8 @@ bb369: ; preds = %bb368, %bb356 br i1 undef, label %bb373, label %bb388 bb373: ; preds = %bb383, %bb369 - %7 = call i8* @SyFgets(i8* undef, i32 %0) nounwind ; [#uses=1] - %8 = icmp eq i8* %7, null ; [#uses=1] + %7 = call ptr @SyFgets(ptr undef, i32 %0) nounwind ; [#uses=1] + %8 = icmp eq ptr %7, null ; [#uses=1] br i1 %8, label %bb375, label %bb383 bb375: ; preds = %bb373 @@ -189,7 +189,7 @@ bb376: ; preds = %bb375 ret void bb383: ; preds = %bb373 - %10 = load i8, i8* undef, align 1 ; [#uses=1] + %10 = load i8, ptr undef, align 1 ; [#uses=1] %cond1 = icmp eq i8 %10, 46 ; [#uses=1] br i1 %cond1, label %bb373, label %bb388 @@ -203,7 +203,7 @@ bb390: ; preds = %isdigit1498.exit83, bb391: ; preds = %bb390, %bb388 %indvar724 = phi i32 [ %indvar.next725, %bb390 ], [ 0, %bb388 ] ; [#uses=2] - %11 = load i8, i8* undef, align 1 ; [#uses=0] + %11 = load i8, ptr undef, align 1 ; [#uses=0] br i1 false, label %bb395, label %bb392 bb392: ; preds = %bb391 @@ -217,7 +217,7 @@ bb394: ; preds = %isdigit1498.exit87 bb395: ; preds = %bb394, %isdigit1498.exit83, %bb391 %storemerge14.sum = add i32 %indvar724, undef ; [#uses=1] - %p.26 = getelementptr [256 x i8], [256 x i8]* %line, i32 0, i32 %storemerge14.sum ; [#uses=1] + %p.26 = getelementptr [256 x i8], ptr %line, i32 0, i32 %storemerge14.sum ; [#uses=1] br i1 undef, label %bb400, label %isdigit1498.exit87 isdigit1498.exit87: ; preds = %bb395 @@ -227,11 +227,11 @@ bb400: ; preds = %isdigit1498.exit87, br i1 undef, label %bb402, label %bb403 bb402: ; preds = %bb400 - %12 = getelementptr inbounds i8, i8* %p.26, i32 undef ; [#uses=1] + %12 = getelementptr inbounds i8, ptr %p.26, i32 undef ; [#uses=1] br label %bb403 bb403: ; preds = %bb402, %bb400 - %p.29 = phi i8* [ %12, %bb402 ], [ undef, %bb400 ] ; [#uses=0] + %p.29 = phi ptr [ %12, %bb402 ], [ undef, %bb400 ] ; [#uses=0] br i1 undef, label %bb405, label %bb404 bb404: ; preds = %bb403 @@ -255,7 +255,7 @@ bb428: ; preds = %bb407 br label %bb440 bb440: ; preds = %bb428, %bb300 - %13 = call i8* @SyFgets(i8* undef, i32 %0) nounwind ; [#uses=0] + %13 = call ptr @SyFgets(ptr undef, i32 %0) nounwind ; [#uses=0] br i1 false, label %bb442, label %bb308 bb442: ; preds = %bb440 diff --git a/llvm/test/CodeGen/Thumb2/2010-03-15-AsmCCClobber.ll b/llvm/test/CodeGen/Thumb2/2010-03-15-AsmCCClobber.ll index b28f4542cf3d22..8613b5eb4f4e78 100644 --- a/llvm/test/CodeGen/Thumb2/2010-03-15-AsmCCClobber.ll +++ b/llvm/test/CodeGen/Thumb2/2010-03-15-AsmCCClobber.ll @@ -7,9 +7,9 @@ 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-n32" %0 = type { i32, i32 } -%s1 = type { %s3, i32, %s4, i8*, void (i8*, i8*)*, i8*, i32*, i32*, i32*, i32, i64, [1 x i32] } -%s2 = type { i32 (...)**, %s4 } -%s3 = type { %s2, i32, i32, i32*, [4 x i8], float, %s4, i8*, i8* } +%s1 = type { %s3, i32, %s4, ptr, ptr, ptr, ptr, ptr, ptr, i32, i64, [1 x i32] } +%s2 = type { ptr, %s4 } +%s3 = type { %s2, i32, i32, ptr, [4 x i8], float, %s4, ptr, ptr } %s4 = type { %s5 } %s5 = type { i32 } @@ -20,44 +20,43 @@ target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:32- ; CHECK-DAG: lsls {{r[0-9]+}} ; CHECK-NEXT: orr.w {{r[0-9]+}} ; CHECK-NEXT: InlineAsm Start -define void @test(%s1* %this, i32 %format, i32 %w, i32 %h, i32 %levels, i32* %s, i8* %data, i32* nocapture %rowbytes, void (i8*, i8*)* %release, i8* %info) nounwind { +define void @test(ptr %this, i32 %format, i32 %w, i32 %h, i32 %levels, ptr %s, ptr %data, ptr nocapture %rowbytes, ptr %release, ptr %info) nounwind { entry: - %tmp1 = getelementptr inbounds %s1, %s1* %this, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 - store volatile i32 1, i32* %tmp1, align 4 - %tmp12 = getelementptr inbounds %s1, %s1* %this, i32 0, i32 1 - store i32 %levels, i32* %tmp12, align 4 - %tmp13 = getelementptr inbounds %s1, %s1* %this, i32 0, i32 3 - store i8* %data, i8** %tmp13, align 4 - %tmp14 = getelementptr inbounds %s1, %s1* %this, i32 0, i32 4 - store void (i8*, i8*)* %release, void (i8*, i8*)** %tmp14, align 4 - %tmp15 = getelementptr inbounds %s1, %s1* %this, i32 0, i32 5 - store i8* %info, i8** %tmp15, align 4 - %tmp16 = getelementptr inbounds %s1, %s1* %this, i32 0, i32 6 - store i32* null, i32** %tmp16, align 4 - %tmp17 = getelementptr inbounds %s1, %s1* %this, i32 0, i32 7 - store i32* null, i32** %tmp17, align 4 - %tmp19 = getelementptr inbounds %s1, %s1* %this, i32 0, i32 10 - store i64 0, i64* %tmp19, align 4 - %tmp20 = getelementptr inbounds %s1, %s1* %this, i32 0, i32 0 - tail call void @f1(%s3* %tmp20, i32* %s) nounwind + %tmp1 = getelementptr inbounds %s1, ptr %this, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 + store volatile i32 1, ptr %tmp1, align 4 + %tmp12 = getelementptr inbounds %s1, ptr %this, i32 0, i32 1 + store i32 %levels, ptr %tmp12, align 4 + %tmp13 = getelementptr inbounds %s1, ptr %this, i32 0, i32 3 + store ptr %data, ptr %tmp13, align 4 + %tmp14 = getelementptr inbounds %s1, ptr %this, i32 0, i32 4 + store ptr %release, ptr %tmp14, align 4 + %tmp15 = getelementptr inbounds %s1, ptr %this, i32 0, i32 5 + store ptr %info, ptr %tmp15, align 4 + %tmp16 = getelementptr inbounds %s1, ptr %this, i32 0, i32 6 + store ptr null, ptr %tmp16, align 4 + %tmp17 = getelementptr inbounds %s1, ptr %this, i32 0, i32 7 + store ptr null, ptr %tmp17, align 4 + %tmp19 = getelementptr inbounds %s1, ptr %this, i32 0, i32 10 + store i64 0, ptr %tmp19, align 4 + tail call void @f1(ptr %this, ptr %s) nounwind %tmp21 = shl i32 %format, 6 %tmp22 = tail call zeroext i8 @f2(i32 %format) nounwind %toBoolnot = icmp eq i8 %tmp22, 0 %tmp23 = zext i1 %toBoolnot to i32 %flags.0 = or i32 %tmp23, %tmp21 %tmp24 = shl i32 %flags.0, 16 - %asmtmp.i.i.i = tail call %0 asm sideeffect "\0A0:\09ldrex $1, [$2]\0A\09orr $1, $1, $3\0A\09strex $0, $1, [$2]\0A\09cmp $0, #0\0A\09bne 0b", "=&r,=&r,r,r,~{memory},~{cc}"(i32* %tmp1, i32 %tmp24) nounwind - %tmp25 = getelementptr inbounds %s1, %s1* %this, i32 0, i32 2, i32 0, i32 0 - store volatile i32 1, i32* %tmp25, align 4 + %asmtmp.i.i.i = tail call %0 asm sideeffect "\0A0:\09ldrex $1, [$2]\0A\09orr $1, $1, $3\0A\09strex $0, $1, [$2]\0A\09cmp $0, #0\0A\09bne 0b", "=&r,=&r,r,r,~{memory},~{cc}"(ptr %tmp1, i32 %tmp24) nounwind + %tmp25 = getelementptr inbounds %s1, ptr %this, i32 0, i32 2, i32 0, i32 0 + store volatile i32 1, ptr %tmp25, align 4 %tmp26 = icmp eq i32 %levels, 0 br i1 %tmp26, label %return, label %bb4 bb4: %l.09 = phi i32 [ %tmp28, %bb4 ], [ 0, %entry ] - %scevgep = getelementptr %s1, %s1* %this, i32 0, i32 11, i32 %l.09 - %scevgep10 = getelementptr i32, i32* %rowbytes, i32 %l.09 - %tmp27 = load i32, i32* %scevgep10, align 4 - store i32 %tmp27, i32* %scevgep, align 4 + %scevgep = getelementptr %s1, ptr %this, i32 0, i32 11, i32 %l.09 + %scevgep10 = getelementptr i32, ptr %rowbytes, i32 %l.09 + %tmp27 = load i32, ptr %scevgep10, align 4 + store i32 %tmp27, ptr %scevgep, align 4 %tmp28 = add i32 %l.09, 1 %exitcond = icmp eq i32 %tmp28, %levels br i1 %exitcond, label %return, label %bb4 @@ -66,5 +65,5 @@ return: ret void } -declare void @f1(%s3*, i32*) +declare void @f1(ptr, ptr) declare zeroext i8 @f2(i32) diff --git a/llvm/test/CodeGen/Thumb2/2010-04-26-CopyRegCrash.ll b/llvm/test/CodeGen/Thumb2/2010-04-26-CopyRegCrash.ll index 3be016fbd1dd95..b7cb3a2447b79c 100644 --- a/llvm/test/CodeGen/Thumb2/2010-04-26-CopyRegCrash.ll +++ b/llvm/test/CodeGen/Thumb2/2010-04-26-CopyRegCrash.ll @@ -53,7 +53,7 @@ bb107: ; preds = %bb18 bb110: ; preds = %bb122, %bb107 %asmtmp.i.i179 = tail call i16 asm "rev16 $0, $1\0A", "=l,l"(i16 undef) nounwind ; [#uses=1] %asmtmp.i.i178 = tail call i16 asm "rev16 $0, $1\0A", "=l,l"(i16 %asmtmp.i.i179) nounwind ; [#uses=1] - store i16 %asmtmp.i.i178, i16* undef, align 2 + store i16 %asmtmp.i.i178, ptr undef, align 2 br i1 undef, label %bb122, label %bb121 bb121: ; preds = %bb110 diff --git a/llvm/test/CodeGen/Thumb2/2010-06-14-NEONCoalescer.ll b/llvm/test/CodeGen/Thumb2/2010-06-14-NEONCoalescer.ll index 15f789e49d41e4..51b7366d65edda 100644 --- a/llvm/test/CodeGen/Thumb2/2010-06-14-NEONCoalescer.ll +++ b/llvm/test/CodeGen/Thumb2/2010-06-14-NEONCoalescer.ll @@ -10,9 +10,9 @@ target triple = "thumbv7-apple-darwin10" ; ; Only one can be coalesced. -@.str = private constant [7 x i8] c"%g %g\0A\00", align 4 ; <[7 x i8]*> [#uses=1] +@.str = private constant [7 x i8] c"%g %g\0A\00", align 4 ; [#uses=1] -define i32 @main(i32 %argc, i8** nocapture %Argv) nounwind { +define i32 @main(i32 %argc, ptr nocapture %Argv) nounwind { entry: %0 = icmp eq i32 %argc, 2123 ; [#uses=1] %U.0 = select i1 %0, double 3.282190e+01, double 8.731834e+02 ; [#uses=2] @@ -32,11 +32,11 @@ entry: %tmp7 = extractelement <2 x double> %5, i32 0 ; [#uses=1] %tmp5 = extractelement <2 x double> %5, i32 1 ; [#uses=1] ; CHECK: printf - %7 = tail call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i32 0, i32 0), double %tmp7, double %tmp5) nounwind ; [#uses=0] + %7 = tail call i32 (ptr, ...) @printf(ptr @.str, double %tmp7, double %tmp5) nounwind ; [#uses=0] %tmp3 = extractelement <2 x double> %6, i32 0 ; [#uses=1] %tmp1 = extractelement <2 x double> %6, i32 1 ; [#uses=1] - %8 = tail call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i32 0, i32 0), double %tmp3, double %tmp1) nounwind ; [#uses=0] + %8 = tail call i32 (ptr, ...) @printf(ptr @.str, double %tmp3, double %tmp1) nounwind ; [#uses=0] ret i32 0 } -declare i32 @printf(i8* nocapture, ...) nounwind +declare i32 @printf(ptr nocapture, ...) nounwind diff --git a/llvm/test/CodeGen/Thumb2/2010-06-19-ITBlockCrash.ll b/llvm/test/CodeGen/Thumb2/2010-06-19-ITBlockCrash.ll index 42039161fbb00f..b89640ced33119 100644 --- a/llvm/test/CodeGen/Thumb2/2010-06-19-ITBlockCrash.ll +++ b/llvm/test/CodeGen/Thumb2/2010-06-19-ITBlockCrash.ll @@ -3,7 +3,7 @@ declare arm_apcscc i32 @__maskrune(i32, i32) -define arm_apcscc i32 @strncmpic(i8* nocapture %s1, i8* nocapture %s2, i32 %n) nounwind { +define arm_apcscc i32 @strncmpic(ptr nocapture %s1, ptr nocapture %s2, i32 %n) nounwind { entry: br i1 undef, label %bb11, label %bb19 @@ -18,7 +18,7 @@ bb1.i.i11: ; preds = %bb11 %1 = tail call arm_apcscc i32 @__maskrune(i32 %0, i32 32768) nounwind ; [#uses=1] %2 = icmp ne i32 %1, 0 ; [#uses=1] %3 = zext i1 %2 to i32 ; [#uses=1] - %.pre = load i8, i8* undef, align 1 ; [#uses=1] + %.pre = load i8, ptr undef, align 1 ; [#uses=1] br label %isupper144.exit12 isupper144.exit12: ; preds = %bb1.i.i11, %bb.i.i10 diff --git a/llvm/test/CodeGen/Thumb2/2010-06-21-TailMergeBug.ll b/llvm/test/CodeGen/Thumb2/2010-06-21-TailMergeBug.ll index 34569e9116f2d4..bc7a6a149a4b3b 100644 --- a/llvm/test/CodeGen/Thumb2/2010-06-21-TailMergeBug.ll +++ b/llvm/test/CodeGen/Thumb2/2010-06-21-TailMergeBug.ll @@ -2,33 +2,33 @@ ; rdar://8115404 ; Tail merging must not split an IT block. -%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 = type { ptr, i32, i32, i16, i16, %struct.__sbuf, i32, ptr, ptr, ptr, ptr, ptr, %struct.__sbuf, ptr, i32, [3 x i8], [1 x i8], %struct.__sbuf, i32, i64 } %struct._RuneCharClass = type { [14 x i8], i32 } -%struct._RuneEntry = type { i32, i32, i32, i32* } -%struct._RuneLocale = type { [8 x i8], [32 x i8], i32 (i8*, i32, i8**)*, i32 (i32, i8*, i32, i8**)*, i32, [256 x i32], [256 x i32], [256 x i32], %struct._RuneRange, %struct._RuneRange, %struct._RuneRange, i8*, i32, i32, %struct._RuneCharClass* } -%struct._RuneRange = type { i32, %struct._RuneEntry* } +%struct._RuneEntry = type { i32, i32, i32, ptr } +%struct._RuneLocale = type { [8 x i8], [32 x i8], ptr, ptr, i32, [256 x i32], [256 x i32], [256 x i32], %struct._RuneRange, %struct._RuneRange, %struct._RuneRange, ptr, i32, i32, ptr } +%struct._RuneRange = type { i32, ptr } %struct.__sFILEX = type opaque -%struct.__sbuf = type { i8*, i32 } - -@finput = external global %struct.FILE* ; <%struct.FILE**> [#uses=1] -@_DefaultRuneLocale = external global %struct._RuneLocale ; <%struct._RuneLocale*> [#uses=0] -@token_buffer = external global [1025 x i8], align 4 ; <[1025 x i8]*> [#uses=1] -@.str73 = external constant [6 x i8], align 4 ; <[6 x i8]*> [#uses=0] -@.str174 = external constant [5 x i8], align 4 ; <[5 x i8]*> [#uses=0] -@.str275 = external constant [6 x i8], align 4 ; <[6 x i8]*> [#uses=0] -@.str376 = external constant [5 x i8], align 4 ; <[5 x i8]*> [#uses=0] -@.str477 = external constant [6 x i8], align 4 ; <[6 x i8]*> [#uses=0] -@.str578 = external constant [6 x i8], align 4 ; <[6 x i8]*> [#uses=0] -@.str679 = external constant [7 x i8], align 4 ; <[7 x i8]*> [#uses=0] -@.str780 = external constant [6 x i8], align 4 ; <[6 x i8]*> [#uses=0] -@.str881 = external constant [5 x i8], align 4 ; <[5 x i8]*> [#uses=0] -@.str982 = external constant [6 x i8], align 4 ; <[6 x i8]*> [#uses=0] -@.str1083 = external constant [9 x i8], align 4 ; <[9 x i8]*> [#uses=0] -@.str1184 = external constant [7 x i8], align 4 ; <[7 x i8]*> [#uses=0] -@.str1285 = external constant [16 x i8], align 4 ; <[16 x i8]*> [#uses=0] -@.str1386 = external constant [12 x i8], align 4 ; <[12 x i8]*> [#uses=0] -@.str1487 = external constant [5 x i8], align 4 ; <[5 x i8]*> [#uses=0] -@llvm.used = external global [1 x i8*] ; <[1 x i8*]*> [#uses=0] +%struct.__sbuf = type { ptr, i32 } + +@finput = external global ptr ; [#uses=1] +@_DefaultRuneLocale = external global %struct._RuneLocale ; [#uses=0] +@token_buffer = external global [1025 x i8], align 4 ; [#uses=1] +@.str73 = external constant [6 x i8], align 4 ; [#uses=0] +@.str174 = external constant [5 x i8], align 4 ; [#uses=0] +@.str275 = external constant [6 x i8], align 4 ; [#uses=0] +@.str376 = external constant [5 x i8], align 4 ; [#uses=0] +@.str477 = external constant [6 x i8], align 4 ; [#uses=0] +@.str578 = external constant [6 x i8], align 4 ; [#uses=0] +@.str679 = external constant [7 x i8], align 4 ; [#uses=0] +@.str780 = external constant [6 x i8], align 4 ; [#uses=0] +@.str881 = external constant [5 x i8], align 4 ; [#uses=0] +@.str982 = external constant [6 x i8], align 4 ; [#uses=0] +@.str1083 = external constant [9 x i8], align 4 ; [#uses=0] +@.str1184 = external constant [7 x i8], align 4 ; [#uses=0] +@.str1285 = external constant [16 x i8], align 4 ; [#uses=0] +@.str1386 = external constant [12 x i8], align 4 ; [#uses=0] +@.str1487 = external constant [5 x i8], align 4 ; [#uses=0] +@llvm.used = external global [1 x ptr] ; [#uses=0] define fastcc i32 @parse_percent_token() nounwind { entry: @@ -85,18 +85,18 @@ bb10: ; preds = %bb9 br label %bb11 bb11: ; preds = %bb10, %bb9 - %p.0 = phi i8* [ undef, %bb10 ], [ %p.1, %bb9 ] ; [#uses=1] - %0 = load %struct.FILE*, %struct.FILE** @finput, align 4 ; <%struct.FILE*> [#uses=1] - %1 = tail call i32 @getc(%struct.FILE* %0) nounwind ; [#uses=0] + %p.0 = phi ptr [ undef, %bb10 ], [ %p.1, %bb9 ] ; [#uses=1] + %0 = load ptr, ptr @finput, align 4 ; [#uses=1] + %1 = tail call i32 @getc(ptr %0) nounwind ; [#uses=0] br label %bb12 bb12: ; preds = %bb11, %bb.i.i - %p.1 = phi i8* [ %p.0, %bb11 ], [ getelementptr inbounds ([1025 x i8], [1025 x i8]* @token_buffer, i32 0, i32 0), %bb.i.i ] ; [#uses=2] + %p.1 = phi ptr [ %p.0, %bb11 ], [ @token_buffer, %bb.i.i ] ; [#uses=2] %2 = icmp ult i32 undef, 128 ; [#uses=1] br i1 %2, label %bb.i.i2, label %bb1.i.i3 bb.i.i2: ; preds = %bb12 - %3 = load i32, i32* null, align 4 ; [#uses=1] + %3 = load i32, ptr null, align 4 ; [#uses=1] %4 = lshr i32 %3, 8 ; [#uses=1] %.lobit.i1 = and i32 %4, 1 ; [#uses=1] %.not = icmp ne i32 %.lobit.i1, 0 ; [#uses=1] @@ -107,7 +107,7 @@ bb1.i.i3: ; preds = %bb12 unreachable bb14: ; preds = %bb.i.i2 - store i8 0, i8* %p.1, align 1 + store i8 0, ptr %p.1, align 1 br i1 undef, label %bb43, label %bb15 bb15: ; preds = %bb14 @@ -118,10 +118,10 @@ bb43: ; preds = %bb14, %bb.i.i, %ent ret i32 %.0 } -declare i32 @getc(%struct.FILE* nocapture) nounwind +declare i32 @getc(ptr nocapture) nounwind -declare i32 @strcmp(i8* nocapture, i8* nocapture) nounwind readonly +declare i32 @strcmp(ptr nocapture, ptr nocapture) nounwind readonly declare i32 @__maskrune(i32, i32) -declare i32 @ungetc(i32, %struct.FILE* nocapture) nounwind +declare i32 @ungetc(i32, ptr nocapture) nounwind diff --git a/llvm/test/CodeGen/Thumb2/2010-08-10-VarSizedAllocaBug.ll b/llvm/test/CodeGen/Thumb2/2010-08-10-VarSizedAllocaBug.ll index 3b14d22ddbff02..4350744168c310 100644 --- a/llvm/test/CodeGen/Thumb2/2010-08-10-VarSizedAllocaBug.ll +++ b/llvm/test/CodeGen/Thumb2/2010-08-10-VarSizedAllocaBug.ll @@ -1,6 +1,6 @@ ; RUN: llc < %s -mtriple=thumbv7-apple-darwin -mcpu=cortex-a8 -O3 | FileCheck %s -@.str = private constant [4 x i8] c"%d\0A\00", align 4 ; <[4 x i8]*> [#uses=1] +@.str = private constant [4 x i8] c"%d\0A\00", align 4 ; [#uses=1] define internal fastcc i32 @Callee(i32 %i) nounwind { entry: @@ -13,10 +13,10 @@ entry: br i1 %0, label %bb2, label %bb bb: ; preds = %entry - %1 = alloca [1000 x i8], align 4 ; <[1000 x i8]*> [#uses=1] - %.sub = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i32 0, i32 0 ; [#uses=2] - %2 = call i32 (i8*, i32, i32, i8*, ...) @__sprintf_chk(i8* %.sub, i32 0, i32 1000, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i32 %i) nounwind ; [#uses=0] - %3 = load i8, i8* %.sub, align 4 ; [#uses=1] + %1 = alloca [1000 x i8], align 4 ; [#uses=1] + %.sub = getelementptr inbounds [1000 x i8], ptr %1, i32 0, i32 0 ; [#uses=2] + %2 = call i32 (ptr, i32, i32, ptr, ...) @__sprintf_chk(ptr %.sub, i32 0, i32 1000, ptr @.str, i32 %i) nounwind ; [#uses=0] + %3 = load i8, ptr %.sub, align 4 ; [#uses=1] %4 = sext i8 %3 to i32 ; [#uses=1] ret i32 %4 @@ -30,7 +30,7 @@ bb2: ; preds = %entry ret i32 0 } -declare i32 @__sprintf_chk(i8*, i32, i32, i8*, ...) nounwind +declare i32 @__sprintf_chk(ptr, i32, i32, ptr, ...) nounwind define i32 @main() nounwind { ; CHECK-LABEL: main: @@ -52,8 +52,8 @@ bb2: ; preds = %bb ; CHECK-NOT: mov sp, r7 ; CHECK-NOT: sub sp, #12 ; CHECK: pop - %4 = tail call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i32 %2) nounwind ; [#uses=0] + %4 = tail call i32 (ptr, ...) @printf(ptr @.str, i32 %2) nounwind ; [#uses=0] ret i32 0 } -declare i32 @printf(i8* nocapture, ...) nounwind +declare i32 @printf(ptr nocapture, ...) nounwind diff --git a/llvm/test/CodeGen/Thumb2/2010-11-22-EpilogueBug.ll b/llvm/test/CodeGen/Thumb2/2010-11-22-EpilogueBug.ll index 9610cf7ab07a24..dcb384f7701b1d 100644 --- a/llvm/test/CodeGen/Thumb2/2010-11-22-EpilogueBug.ll +++ b/llvm/test/CodeGen/Thumb2/2010-11-22-EpilogueBug.ll @@ -11,7 +11,7 @@ define void @foo() nounwind optsize "frame-pointer"="all" { ; CHECK: add r7, sp ; CHECK: sub sp, #4 entry: - %m.i = alloca %struct.buf*, align 4 + %m.i = alloca ptr, align 4 br label %bb bb: diff --git a/llvm/test/CodeGen/Thumb2/2011-04-21-FILoweringBug.ll b/llvm/test/CodeGen/Thumb2/2011-04-21-FILoweringBug.ll index 9878ae862c7a23..d008598ba5e3f7 100644 --- a/llvm/test/CodeGen/Thumb2/2011-04-21-FILoweringBug.ll +++ b/llvm/test/CodeGen/Thumb2/2011-04-21-FILoweringBug.ll @@ -16,8 +16,8 @@ entry: %size = alloca i32, align 4 %count = alloca i32, align 4 %index = alloca i32, align 4 - %0 = call i32 @foo(i32* %count, i32* %size, i32* %index) nounwind + %0 = call i32 @foo(ptr %count, ptr %size, ptr %index) nounwind ret i32 %0 } -declare i32 @foo(i32*, i32*, i32*) +declare i32 @foo(ptr, ptr, ptr) diff --git a/llvm/test/CodeGen/Thumb2/2011-06-07-TwoAddrEarlyClobber.ll b/llvm/test/CodeGen/Thumb2/2011-06-07-TwoAddrEarlyClobber.ll index 75bce22ebd2460..9120630f1821b6 100644 --- a/llvm/test/CodeGen/Thumb2/2011-06-07-TwoAddrEarlyClobber.ll +++ b/llvm/test/CodeGen/Thumb2/2011-06-07-TwoAddrEarlyClobber.ll @@ -1,6 +1,6 @@ ; RUN: llc -mtriple=thumbv7-apple-darwin10 -arm-atomic-cfg-tidy=0 < %s | FileCheck %s -%struct.op = type { %struct.op*, %struct.op*, %struct.op* ()*, i32, i16, i16, i8, i8 } +%struct.op = type { ptr, ptr, ptr, i32, i16, i16, i8, i8 } ; CHECK: Perl_ck_sort ; CHECK: ldr @@ -9,7 +9,7 @@ define void @Perl_ck_sort() nounwind optsize { entry: - %tmp27 = load %struct.op*, %struct.op** undef, align 4 + %tmp27 = load ptr, ptr undef, align 4 switch i16 undef, label %if.end151 [ i16 178, label %if.then60 i16 177, label %if.then60 @@ -19,14 +19,13 @@ if.then60: ; preds = %if.then40 br i1 undef, label %if.then67, label %if.end95 if.then67: ; preds = %if.then60 - %op_next71 = getelementptr inbounds %struct.op, %struct.op* %tmp27, i32 0, i32 0 - store %struct.op* %tmp27, %struct.op** %op_next71, align 4 - %0 = getelementptr inbounds %struct.op, %struct.op* %tmp27, i32 1, i32 0 + store ptr %tmp27, ptr %tmp27, align 4 + %0 = getelementptr inbounds %struct.op, ptr %tmp27, i32 1, i32 0 br label %if.end95 if.end95: ; preds = %if.else92, %if.then67 - %.pre-phi = phi %struct.op** [ undef, %if.then60 ], [ %0, %if.then67 ] - %tmp98 = load %struct.op*, %struct.op** %.pre-phi, align 4 + %.pre-phi = phi ptr [ undef, %if.then60 ], [ %0, %if.then67 ] + %tmp98 = load ptr, ptr %.pre-phi, align 4 br label %if.end151 if.end151: ; preds = %if.end100, %if.end, %entry diff --git a/llvm/test/CodeGen/Thumb2/2011-12-16-T2SizeReduceAssert.ll b/llvm/test/CodeGen/Thumb2/2011-12-16-T2SizeReduceAssert.ll index 854b42522e7c7f..967de3aca53217 100644 --- a/llvm/test/CodeGen/Thumb2/2011-12-16-T2SizeReduceAssert.ll +++ b/llvm/test/CodeGen/Thumb2/2011-12-16-T2SizeReduceAssert.ll @@ -1,40 +1,39 @@ ; RUN: llc < %s -mtriple=thumbv7-apple-ios -relocation-model=pic -frame-pointer=all -mcpu=cortex-a8 ; RUN: llc < %s -mtriple=thumbv8-none-linux-gnueabi -%struct.LIST_NODE.0.16 = type { %struct.LIST_NODE.0.16*, i8* } +%struct.LIST_NODE.0.16 = type { ptr, ptr } -define %struct.LIST_NODE.0.16* @list_AssocListPair(%struct.LIST_NODE.0.16* %List, i8* %Key) nounwind readonly { +define ptr @list_AssocListPair(ptr %List, ptr %Key) nounwind readonly { entry: br label %bb3 bb: ; preds = %bb3 - %Scan.0.idx7.val = load i8*, i8** undef, align 4 - %.idx = getelementptr i8, i8* %Scan.0.idx7.val, i32 4 - %0 = bitcast i8* %.idx to i8** - %.idx.val = load i8*, i8** %0, align 4 - %1 = icmp eq i8* %.idx.val, %Key - br i1 %1, label %bb5, label %bb2 + %Scan.0.idx7.val = load ptr, ptr undef, align 4 + %.idx = getelementptr i8, ptr %Scan.0.idx7.val, i32 4 + %.idx.val = load ptr, ptr %.idx, align 4 + %0 = icmp eq ptr %.idx.val, %Key + br i1 %0, label %bb5, label %bb2 bb2: ; preds = %bb - %Scan.0.idx8.val = load %struct.LIST_NODE.0.16*, %struct.LIST_NODE.0.16** undef, align 4 + %Scan.0.idx8.val = load ptr, ptr undef, align 4 br label %bb3 bb3: ; preds = %bb2, %entry - %Scan.0 = phi %struct.LIST_NODE.0.16* [ %List, %entry ], [ %Scan.0.idx8.val, %bb2 ] - %2 = icmp eq %struct.LIST_NODE.0.16* %Scan.0, null - br i1 %2, label %bb5, label %bb + %Scan.0 = phi ptr [ %List, %entry ], [ %Scan.0.idx8.val, %bb2 ] + %1 = icmp eq ptr %Scan.0, null + br i1 %1, label %bb5, label %bb bb5: ; preds = %bb3, %bb - ret %struct.LIST_NODE.0.16* null + ret ptr null } declare void @use(i32) -define double @find_max_double(i32 %n, double* nocapture readonly %aa) { +define double @find_max_double(i32 %n, ptr nocapture readonly %aa) { entry: br i1 undef, label %for.body, label %for.end for.body: ; preds = %for.body, %entry - %0 = load double, double* null, align 8 + %0 = load double, ptr null, align 8 %cmp2.6 = fcmp ogt double %0, 0.000000e+00 %idx.1.6 = select i1 %cmp2.6, i32 undef, i32 0 %idx.1.7 = select i1 undef, i32 undef, i32 %idx.1.6 diff --git a/llvm/test/CodeGen/Thumb2/2013-02-19-tail-call-register-hint.ll b/llvm/test/CodeGen/Thumb2/2013-02-19-tail-call-register-hint.ll index c9d3f3dd2847ed..31223377213ff3 100644 --- a/llvm/test/CodeGen/Thumb2/2013-02-19-tail-call-register-hint.ll +++ b/llvm/test/CodeGen/Thumb2/2013-02-19-tail-call-register-hint.ll @@ -11,39 +11,35 @@ %"myclass" = type { %struct.foo } %struct.foo = type { i32, [40 x i8] } -define hidden void @func(i8* %Data) nounwind ssp { - %1 = getelementptr inbounds i8, i8* %Data, i32 12 - %2 = bitcast i8* %1 to %"myclass"* - tail call void @abc(%"myclass"* %2) nounwind - tail call void @def(%"myclass"* %2) nounwind - %3 = getelementptr inbounds i8, i8* %Data, i32 8 - %4 = bitcast i8* %3 to i8** - %5 = load i8*, i8** %4, align 4 - tail call void @ghi(i8* %5) nounwind - %6 = bitcast i8* %Data to void (i8*)** - %7 = load void (i8*)*, void (i8*)** %6, align 4 - %8 = getelementptr inbounds i8, i8* %Data, i32 4 - %9 = bitcast i8* %8 to i8** - %10 = load i8*, i8** %9, align 4 - %11 = icmp eq i8* %Data, null - br i1 %11, label %14, label %12 +define hidden void @func(ptr %Data) nounwind ssp { + %1 = getelementptr inbounds i8, ptr %Data, i32 12 + tail call void @abc(ptr %1) nounwind + tail call void @def(ptr %1) nounwind + %2 = getelementptr inbounds i8, ptr %Data, i32 8 + %3 = load ptr, ptr %2, align 4 + tail call void @ghi(ptr %3) nounwind + %4 = load ptr, ptr %Data, align 4 + %5 = getelementptr inbounds i8, ptr %Data, i32 4 + %6 = load ptr, ptr %5, align 4 + %7 = icmp eq ptr %Data, null + br i1 %7, label %10, label %8 ;