Test source: git
Source: <stdin> ERROR: Unsupported instruction: %r = load i16, i16 addrspace(1)* addrspacecast (i16* bitcast ({ { i32, i8 }, i32 }* @g1 to i16*) to i16 addrspace(1)*), align 2 ERROR: Unsupported type: ppc_fp128 ERROR: Unsupported type: x86_fp80 ERROR: Unsupported constant: [2 x i8 addrspace(1)*] [i8 addrspace(1)* inttoptr (i16 1 to i8 addrspace(1)*), i8 addrspace(1)* inttoptr (i16 2 to i8 addrspace(1)*)] ERROR: Unsupported constant: { [4294967295 x [0 x i32]], i64 } { [4294967295 x [0 x i32]] undef, i64 123 } ERROR: Unsupported constant: [4294967295 x [0 x i32]] zeroinitializer ERROR: Unsupported type: x86_mmx ---------------------------------------- @g1 = constant 12 bytes, align 8 define i32 @test1() { #init: %__copy_0 = {{i32, i8, i24}, i32} { { 3735928559, 186, [padding] }, 3405691582 } store {{i32, i8, i24}, i32} %__copy_0, * @g1, align 8 br label %0 %0: %__constexpr_0 = gep inbounds * @g1, 12 x i32 0, 1 x i64 0, 1 x i64 0 %r = load i32, * %__constexpr_0, align 4 ret i32 %r } => @g1 = constant 12 bytes, align 8 define i32 @test1() { #init: %__copy_0 = {{i32, i8, i24}, i32} { { 3735928559, 186, [padding] }, 3405691582 } store {{i32, i8, i24}, i32} %__copy_0, * @g1, align 8 br label %0 %0: ret i32 3735928559 } Transformation seems to be correct! ---------------------------------------- @g1 = constant 12 bytes, align 8 define i16 @test2() { #init: %__copy_0 = {{i32, i8, i24}, i32} { { 3735928559, 186, [padding] }, 3405691582 } store {{i32, i8, i24}, i32} %__copy_0, * @g1, align 8 br label %0 %0: %__constexpr_0 = bitcast * @g1 to * %r = load i16, * %__constexpr_0, align 2 ret i16 %r } => @g1 = constant 12 bytes, align 8 define i16 @test2() { #init: %__copy_0 = {{i32, i8, i24}, i32} { { 3735928559, 186, [padding] }, 3405691582 } store {{i32, i8, i24}, i32} %__copy_0, * @g1, align 8 br label %0 %0: ret i16 48879 } Transformation seems to be correct! ---------------------------------------- @g1 = constant 12 bytes, align 8 define i16 @test3() { #init: %__copy_0 = {{i32, i8, i24}, i32} { { 3735928559, 186, [padding] }, 3405691582 } store {{i32, i8, i24}, i32} %__copy_0, * @g1, align 8 br label %0 %0: %__constexpr_1 = bitcast * @g1 to * %__constexpr_0 = gep * %__constexpr_1, 2 x i32 1 %r = load i16, * %__constexpr_0, align 2 ret i16 %r } => @g1 = constant 12 bytes, align 8 define i16 @test3() { #init: %__copy_0 = {{i32, i8, i24}, i32} { { 3735928559, 186, [padding] }, 3405691582 } store {{i32, i8, i24}, i32} %__copy_0, * @g1, align 8 br label %0 %0: ret i16 57005 } Transformation seems to be correct! ---------------------------------------- @g1 = constant 12 bytes, align 8 define i16 @test4() { #init: %__copy_0 = {{i32, i8, i24}, i32} { { 3735928559, 186, [padding] }, 3405691582 } store {{i32, i8, i24}, i32} %__copy_0, * @g1, align 8 br label %0 %0: %__constexpr_1 = bitcast * @g1 to * %__constexpr_0 = gep * %__constexpr_1, 2 x i32 2 %r = load i16, * %__constexpr_0, align 2 ret i16 %r } => @g1 = constant 12 bytes, align 8 define i16 @test4() { #init: %__copy_0 = {{i32, i8, i24}, i32} { { 3735928559, 186, [padding] }, 3405691582 } store {{i32, i8, i24}, i32} %__copy_0, * @g1, align 8 br label %0 %0: ret i16 186 } Transformation seems to be correct! ---------------------------------------- @g2 = constant 8 bytes, align 8 define i64 @test6() { #init: store double 1.000000, * @g2, align 8 br label %0 %0: %__constexpr_0 = bitcast * @g2 to * %r = load i64, * %__constexpr_0, align 8 ret i64 %r } => @g2 = constant 8 bytes, align 8 define i64 @test6() { #init: store double 1.000000, * @g2, align 8 br label %0 %0: ret i64 4607182418800017408 } Transformation seems to be correct! ---------------------------------------- @g2 = constant 8 bytes, align 8 define i16 @test7() { #init: store double 1.000000, * @g2, align 8 br label %0 %0: %__constexpr_0 = bitcast * @g2 to * %r = load i16, * %__constexpr_0, align 2 ret i16 %r } => @g2 = constant 8 bytes, align 8 define i16 @test7() { #init: store double 1.000000, * @g2, align 8 br label %0 %0: ret i16 0 } Transformation seems to be correct! ---------------------------------------- @g1 = constant 12 bytes, align 8 define double @test8() { #init: %__copy_0 = {{i32, i8, i24}, i32} { { 3735928559, 186, [padding] }, 3405691582 } store {{i32, i8, i24}, i32} %__copy_0, * @g1, align 8 br label %0 %0: %__constexpr_0 = bitcast * @g1 to * %r = load double, * %__constexpr_0, align 8 ret double %r } => @g1 = constant 12 bytes, align 8 define double @test8() { #init: %__copy_0 = {{i32, i8, i24}, i32} { { 3735928559, 186, [padding] }, 3405691582 } store {{i32, i8, i24}, i32} %__copy_0, * @g1, align 8 br label %0 %0: ret double 0.000000 } Transformation seems to be correct! ---------------------------------------- @g3 = constant 16 bytes, align 8 define i128 @test_i128() { #init: store {i64, i64} { 123, 112312312 }, * @g3, align 8 br label %0 %0: %__constexpr_0 = bitcast * @g3 to * %r = load i128, * %__constexpr_0, align 8 ret i128 %r } => @g3 = constant 16 bytes, align 8 define i128 @test_i128() { #init: store {i64, i64} { 123, 112312312 }, * @g3, align 8 br label %0 %0: ret i128 2071796475790618158476296315 } Transformation seems to be correct! ---------------------------------------- @g3 = constant 16 bytes, align 8 define fp128 @test_fp128() { #init: store {i64, i64} { 123, 112312312 }, * @g3, align 8 br label %0 %0: %__constexpr_0 = bitcast * @g3 to * %r = load fp128, * %__constexpr_0, align 16 ret fp128 %r } => @g3 = constant 16 bytes, align 8 define fp128 @test_fp128() { #init: store {i64, i64} { 123, 112312312 }, * @g3, align 8 br label %0 %0: ret fp128 2071796475790618158476296315 } Transformation seems to be correct! ERROR: Unsupported type: ppc_fp128 ERROR: Unsupported type: x86_fp80 ---------------------------------------- @g3 = constant 16 bytes, align 8 define bfloat @test_bfloat() { #init: store {i64, i64} { 123, 112312312 }, * @g3, align 8 br label %0 %0: %__constexpr_0 = bitcast * @g3 to * %r = load bfloat, * %__constexpr_0, align 2 ret bfloat %r } => @g3 = constant 16 bytes, align 8 define bfloat @test_bfloat() { #init: store {i64, i64} { 123, 112312312 }, * @g3, align 8 br label %0 %0: ret bfloat 0.000000 } Transformation seems to be correct! ---------------------------------------- @g3 = constant 16 bytes, align 8 define <2 x i64> @test10() { #init: store {i64, i64} { 123, 112312312 }, * @g3, align 8 br label %0 %0: %__constexpr_0 = bitcast * @g3 to * %r = load <2 x i64>, * %__constexpr_0, align 16 ret <2 x i64> %r } => @g3 = constant 16 bytes, align 8 define <2 x i64> @test10() { #init: store {i64, i64} { 123, 112312312 }, * @g3, align 8 br label %0 %0: ret <2 x i64> { 123, 112312312 } } Transformation seems to be correct! ---------------------------------------- @g4 = constant 2 bytes, align 8 define i16 @test11() { #init: store {i8, i8} { 161, 8 }, * @g4, align 8 br label %entry %entry: %__constexpr_0 = bitcast * @g4 to * %a = load i16, * %__constexpr_0, align 2 ret i16 %a } => @g4 = constant 2 bytes, align 8 define i16 @test11() { #init: store {i8, i8} { 161, 8 }, * @g4, align 8 br label %entry %entry: ret i16 2209 } Transformation seems to be correct! ---------------------------------------- @test12g = constant 6 bytes, align 1 define i16 @test12() { #init: store [6 x i8] { 97, 0, 98, 0, 0, 0 }, * @test12g, align 1 br label %0 %0: %__constexpr_1 = bitcast * @test12g to * %__constexpr_0 = gep inbounds * %__constexpr_1, 6 x i32 0, 2 x i64 1 %a = load i16, * %__constexpr_0, align 2 ret i16 %a } => @test12g = constant 6 bytes, align 1 define i16 @test12() { #init: store [6 x i8] { 97, 0, 98, 0, 0, 0 }, * @test12g, align 1 br label %0 %0: ret i16 98 } Transformation seems to be correct! ---------------------------------------- @g5 = constant 1 bytes, align 1 define i1 @test13() { #init: store i8 4, * @g5, align 1 br label %0 %0: %__constexpr_0 = bitcast * @g5 to * %A = load i1, * %__constexpr_0, align 1 ret i1 %A } => @g5 = constant 1 bytes, align 1 define i1 @test13() { #init: store i8 4, * @g5, align 1 br label %0 %0: ret i1 0 } Transformation seems to be correct! ---------------------------------------- @g6 = constant 16 bytes, align 8 define i64 @test14() { #init: %__constexpr_1 = int2ptr i64 1 to * %__constexpr_2 = int2ptr i64 2 to * %__copy_0 = [2 x *] { %__constexpr_1, %__constexpr_2 } store [2 x *] %__copy_0, * @g6, align 8 br label %entry %entry: %__constexpr_0 = bitcast * @g6 to * %tmp = load i64, * %__constexpr_0, align 8 ret i64 %tmp } => @g6 = constant 16 bytes, align 8 define i64 @test14() { #init: %__constexpr_0 = int2ptr i64 1 to * %__constexpr_1 = int2ptr i64 2 to * %__copy_0 = [2 x *] { %__constexpr_0, %__constexpr_1 } store [2 x *] %__copy_0, * @g6, align 8 br label %entry %entry: ret i64 1 } Transformation seems to be correct! ---------------------------------------- @g6 = constant 16 bytes, align 8 define i64 @test15() { #init: %__constexpr_2 = int2ptr i64 1 to * %__constexpr_3 = int2ptr i64 2 to * %__copy_0 = [2 x *] { %__constexpr_2, %__constexpr_3 } store [2 x *] %__copy_0, * @g6, align 8 br label %entry %entry: %__constexpr_1 = gep inbounds * @g6, 16 x i32 0, 8 x i64 1 %__constexpr_0 = bitcast * %__constexpr_1 to * %tmp = load i64, * %__constexpr_0, align 8 ret i64 %tmp } => @g6 = constant 16 bytes, align 8 define i64 @test15() { #init: %__constexpr_0 = int2ptr i64 1 to * %__constexpr_1 = int2ptr i64 2 to * %__copy_0 = [2 x *] { %__constexpr_0, %__constexpr_1 } store [2 x *] %__copy_0, * @g6, align 8 br label %entry %entry: ret i64 2 } Transformation seems to be correct! ---------------------------------------- @gv7 = constant 32 bytes, align 16 define i64 @test16.1() { #init: %__constexpr_1 = int2ptr i64 -14 to * %__copy_0 = [4 x *] { null, %__constexpr_1, null, null } store [4 x *] %__copy_0, * @gv7, align 16 br label %0 %0: %__constexpr_0 = bitcast * @gv7 to * %v = load i64, * %__constexpr_0, align 8 ret i64 %v } => @gv7 = constant 32 bytes, align 16 define i64 @test16.1() { #init: %__constexpr_0 = int2ptr i64 -14 to * %__copy_0 = [4 x *] { null, %__constexpr_0, null, null } store [4 x *] %__copy_0, * @gv7, align 16 br label %0 %0: ret i64 0 } Transformation seems to be correct! ---------------------------------------- @gv7 = constant 32 bytes, align 16 define i64 @test16.2() { #init: %__constexpr_2 = int2ptr i64 -14 to * %__copy_0 = [4 x *] { null, %__constexpr_2, null, null } store [4 x *] %__copy_0, * @gv7, align 16 br label %0 %0: %__constexpr_1 = gep inbounds * @gv7, 32 x i64 0, 8 x i64 1 %__constexpr_0 = bitcast * %__constexpr_1 to * %v = load i64, * %__constexpr_0, align 8 ret i64 %v } => @gv7 = constant 32 bytes, align 16 define i64 @test16.2() { #init: %__constexpr_0 = int2ptr i64 -14 to * %__copy_0 = [4 x *] { null, %__constexpr_0, null, null } store [4 x *] %__copy_0, * @gv7, align 16 br label %0 %0: ret i64 -14 } Transformation seems to be correct! ---------------------------------------- @gv7 = constant 32 bytes, align 16 define i64 @test16.3() { #init: %__constexpr_2 = int2ptr i64 -14 to * %__copy_0 = [4 x *] { null, %__constexpr_2, null, null } store [4 x *] %__copy_0, * @gv7, align 16 br label %0 %0: %__constexpr_1 = gep inbounds * @gv7, 32 x i64 0, 8 x i64 2 %__constexpr_0 = bitcast * %__constexpr_1 to * %v = load i64, * %__constexpr_0, align 8 ret i64 %v } => @gv7 = constant 32 bytes, align 16 define i64 @test16.3() { #init: %__constexpr_0 = int2ptr i64 -14 to * %__copy_0 = [4 x *] { null, %__constexpr_0, null, null } store [4 x *] %__copy_0, * @gv7, align 16 br label %0 %0: ret i64 0 } Transformation seems to be correct! ---------------------------------------- @g7 = constant 8 bytes, align 8 define * @test_leading_zero_size_elems() { #init: store {(empty array), (empty array), *} { undef, undef, null }, * @g7, align 8 br label %0 %0: %__constexpr_0 = bitcast * @g7 to * %v = load *, * %__constexpr_0, align 8 ret * %v } => @g7 = constant 8 bytes, align 8 define * @test_leading_zero_size_elems() { #init: store {(empty array), (empty array), *} { undef, undef, null }, * @g7, align 8 br label %0 %0: ret * null } Transformation seems to be correct! ---------------------------------------- @g_undef = constant 16 bytes, align 8 define * @test_undef_aggregate() { #init: store {i128} undef, * @g_undef, align 8 br label %0 %0: %__constexpr_0 = bitcast * @g_undef to * %v = load *, * %__constexpr_0, align 8 ret * %v } => @g_undef = constant 16 bytes, align 8 define * @test_undef_aggregate() { #init: store {i128} undef, * @g_undef, align 8 br label %0 %0: ret * undef } Transformation seems to be correct! ---------------------------------------- @g_poison = constant 16 bytes, align 8 define * @test_poison_aggregate() { #init: store {i128} poison, * @g_poison, align 8 br label %0 %0: %__constexpr_0 = bitcast * @g_poison to * %v = load *, * %__constexpr_0, align 8 ret * %v } => @g_poison = constant 16 bytes, align 8 define * @test_poison_aggregate() { #init: store {i128} poison, * @g_poison, align 8 br label %0 %0: ret * poison } Transformation seems to be correct! ---------------------------------------- @g11 = constant 16 bytes, align 4 define * @test_trailing_zero_gep_index() { #init: store {[8 x i8], [8 x i8]} { undef, { 0, 0, 0, 0, 0, 0, 0, 0 } }, * @g11, align 4 br label %0 %0: %__constexpr_1 = gep inbounds * @g11, 16 x i32 0, 1 x i64 8, 1 x i32 0 %__constexpr_0 = bitcast * %__constexpr_1 to * %v = load *, * %__constexpr_0, align 4 ret * %v } => @g11 = constant 16 bytes, align 4 define * @test_trailing_zero_gep_index() { #init: store {[8 x i8], [8 x i8]} { undef, { 0, 0, 0, 0, 0, 0, 0, 0 } }, * @g11, align 4 br label %0 %0: ret * null } Transformation seems to be correct! ---------------------------------------- @g3 = constant 16 bytes, align 8 define {i64, i64} @test_load_struct() { #init: store {i64, i64} { 123, 112312312 }, * @g3, align 8 br label %0 %0: %v = load {i64, i64}, * @g3, align 8 ret {i64, i64} %v } => @g3 = constant 16 bytes, align 8 define {i64, i64} @test_load_struct() { #init: store {i64, i64} { 123, 112312312 }, * @g3, align 8 br label %0 %0: ret {i64, i64} { 123, 112312312 } } Transformation seems to be correct! ERROR: Unsupported type: x86_mmx ---------------------------------------- @g_neg_one_vec = constant 4 bytes, align 4 @g_offset = global 8 bytes, align 8 define i8 @load_neg_one_at_unknown_offset() { #init: store <4 x i8> { 255, 255, 255, 255 }, * @g_neg_one_vec, align 4 br label %0 %0: %__constexpr_1 = ptrtoint * @g_offset to i64 %__constexpr_0 = gep * @g_neg_one_vec, 4 x i64 0, 1 x i64 %__constexpr_1 %v = load i8, * %__constexpr_0, align 1 ret i8 %v } => @g_neg_one_vec = constant 4 bytes, align 4 @g_offset = global 8 bytes, align 8 define i8 @load_neg_one_at_unknown_offset() { #init: store <4 x i8> { 255, 255, 255, 255 }, * @g_neg_one_vec, align 4 br label %0 %0: ret i8 255 } Transformation seems to be correct! ---------------------------------------- @g_with_padding = constant 8 bytes, align 8 define i32 @load_padding() { #init: store {i32, [4 x i8]} { 0, undef }, * @g_with_padding, align 8 br label %0 %0: %__constexpr_1 = gep inbounds * @g_with_padding, 8 x i32 0, 1 x i64 0 %__constexpr_0 = gep * %__constexpr_1, 4 x i64 1 %v = load i32, * %__constexpr_0, align 4 ret i32 %v } => @g_with_padding = constant 8 bytes, align 8 define i32 @load_padding() { #init: store {i32, [4 x i8]} { 0, undef }, * @g_with_padding, align 8 br label %0 %0: ret i32 undef } Transformation doesn't verify! ERROR: Timeout ---------------------------------------- @g_all_undef = constant 8 bytes, align 8 define i32 @load_all_undef() { #init: store {i32, [4 x i8]} undef, * @g_all_undef, align 8 br label %0 %0: %__constexpr_1 = gep inbounds * @g_all_undef, 8 x i32 0, 1 x i64 0 %__constexpr_0 = gep * %__constexpr_1, 4 x i64 1 %v = load i32, * %__constexpr_0, align 4 ret i32 %v } => @g_all_undef = constant 8 bytes, align 8 define i32 @load_all_undef() { #init: store {i32, [4 x i8]} undef, * @g_all_undef, align 8 br label %0 %0: ret i32 undef } Transformation doesn't verify! ERROR: Timeout ---------------------------------------- @g_i8_data = constant 16 bytes, align 1 define * @load_ptr_from_i8_data() { #init: store [16 x i8] { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, * @g_i8_data, align 1 br label %0 %0: %__constexpr_0 = bitcast * @g_i8_data to * %v = load *, * %__constexpr_0, align 8 ret * %v } => @g_i8_data = constant 16 bytes, align 1 define * @load_ptr_from_i8_data() { #init: store [16 x i8] { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, * @g_i8_data, align 1 br label %0 %0: %__constexpr_0 = int2ptr i64 1 to * ret * %__constexpr_0 } Transformation seems to be correct! ---------------------------------------- @g_i1 = constant 1 bytes, align 1 define i8 @load_i8_from_i1() { #init: store i1 1, * @g_i1, align 1 br label %0 %0: %__constexpr_0 = bitcast * @g_i1 to * %v = load i8, * %__constexpr_0, align 1 ret i8 %v } => @g_i1 = constant 1 bytes, align 1 define i8 @load_i8_from_i1() { #init: store i1 1, * @g_i1, align 1 br label %0 %0: ret i8 255 } Transformation doesn't verify! ERROR: Mismatch in memory Example: Source: >> Jump to %0 * %__constexpr_0 = pointer(non-local, block_id=0, offset=0) i8 %v = #x01 (1) SOURCE MEMORY STATE =================== NON-LOCAL BLOCKS: Block 0 > size: 1 align: 1 alloc type: 0 Target: >> Jump to %0 Mismatch in pointer(non-local, block_id=0, offset=0) Source value: #x01 Target value: #x01 ------------------- SMT STATS ------------------- Num queries: 98 Num invalid: 0 Num skips: 0 Num trivial: 164 (62.6%) Num timeout: 2 (2.0%) Num errors: 0 (0.0%) Num SAT: 89 (90.8%) Num UNSAT: 7 (7.1%) Alive2: Transform doesn't verify; aborting!
+ : 'RUN: at line 2' + /home/nuno/llvm/build/bin/FileCheck /home/nuno/llvm/llvm/test/Transforms/InstSimplify/ConstProp/loads.ll --check-prefixes=CHECK,LE + /home/nuno/alive2/build/opt-alive.sh -data-layout=e-p:64:64:64-p1:16:16:16-p2:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-ni:2 -passes=instsimplify -S FileCheck error: '<stdin>' is empty. FileCheck command line: /home/nuno/llvm/build/bin/FileCheck /home/nuno/llvm/llvm/test/Transforms/InstSimplify/ConstProp/loads.ll --check-prefixes=CHECK,LE