Test source: git
Source: <stdin> ---------------------------------------- @X = constant 4 bytes, align 4 define i32 @test1() { #init: store i32 42, * @X, align 4 br label %0 %0: %B = load i32, * @X, align 4 ret i32 %B } => @X = constant 4 bytes, align 4 define i32 @test1() { #init: store i32 42, * @X, align 4 br label %0 %0: ret i32 42 } Transformation seems to be correct! ---------------------------------------- @Y = constant 16 bytes, align 8 define float @test2() { #init: %__copy_0 = [2 x {i32, float}] { { 12, 1.000000 }, { 37, 1.231200 } } store [2 x {i32, float}] %__copy_0, * @Y, align 8 br label %0 %0: %A = gep * @Y, 16 x i64 0, 8 x i64 1, 1 x i64 4 %B = load float, * %A, align 4 ret float %B } => @Y = constant 16 bytes, align 8 define float @test2() { #init: %__copy_0 = [2 x {i32, float}] { { 12, 1.000000 }, { 37, 1.231200 } } store [2 x {i32, float}] %__copy_0, * @Y, align 8 br label %0 %0: ret float 1.231200 } Transformation seems to be correct! ---------------------------------------- @Y = constant 16 bytes, align 8 define i32 @test3() { #init: %__copy_0 = [2 x {i32, float}] { { 12, 1.000000 }, { 37, 1.231200 } } store [2 x {i32, float}] %__copy_0, * @Y, align 8 br label %0 %0: %A = gep * @Y, 16 x i64 0, 8 x i64 0, 1 x i64 0 %B = load i32, * %A, align 4 ret i32 %B } => @Y = constant 16 bytes, align 8 define i32 @test3() { #init: %__copy_0 = [2 x {i32, float}] { { 12, 1.000000 }, { 37, 1.231200 } } store [2 x {i32, float}] %__copy_0, * @Y, align 8 br label %0 %0: ret i32 12 } Transformation seems to be correct! ---------------------------------------- @Z = constant 16 bytes, align 8 define i32 @test4() { #init: store [2 x {i32, float}] { { 0, 0.000000 }, { 0, 0.000000 } }, * @Z, align 8 br label %0 %0: %A = gep * @Z, 16 x i64 0, 8 x i64 1, 1 x i64 0 %B = load i32, * %A, align 4 ret i32 %B } => @Z = constant 16 bytes, align 8 define i32 @test4() { #init: store [2 x {i32, float}] { { 0, 0.000000 }, { 0, 0.000000 } }, * @Z, align 8 br label %0 %0: ret i32 0 } Transformation seems to be correct! ---------------------------------------- @X = constant 4 bytes, align 4 @X2 = constant 4 bytes, align 4 define i32 @test5(i1 %C) { #init: store i32 42, * @X, align 4 store i32 47, * @X2, align 4 br label %0 %0: %Y = select i1 %C, * @X, * @X2 %Z = load i32, * %Y, align 4 ret i32 %Z } => @X = constant 4 bytes, align 4 @X2 = constant 4 bytes, align 4 define i32 @test5(i1 %C) { #init: store i32 42, * @X, align 4 store i32 47, * @X2, align 4 br label %0 %0: %Z = select i1 %C, i32 42, i32 47 ret i32 %Z } Transformation seems to be correct! ---------------------------------------- define i32 @test7(i32 %X) { %0: %V = gep * null, 4 x i32 %X %R = load i32, * %V, align 4 ret i32 %R } => define i32 @test7(i32 %X) { %0: store i32 undef, * null, align 536870912 ret i32 undef } Transformation seems to be correct! ---------------------------------------- define i32 @test7_no_null_opt(i32 %X) { %0: %V = gep * null, 4 x i32 %X %R = load i32, * %V, align 4 ret i32 %R } => define i32 @test7_no_null_opt(i32 %X) { %0: %1 = sext i32 %X to i64 %V = gep * null, 4 x i64 %1 %R = load i32, * %V, align 4 ret i32 %R } Transformation seems to be correct! ---------------------------------------- define i32 @test8(* %P) { %0: store i32 1, * %P, align 4 %X = load i32, * %P, align 4 ret i32 %X } => define i32 @test8(* %P) { %0: store i32 1, * %P, align 4 ret i32 1 } Transformation seems to be correct! ---------------------------------------- define i32 @test9(* %P) { %0: %X = load i32, * %P, align 4 %Y = load i32, * %P, align 4 %Z = sub i32 %X, %Y ret i32 %Z } => define i32 @test9(* %P) { %0: ret i32 0 } Transformation seems to be correct! ---------------------------------------- define i32 @test10(i1 %C.upgrd.1, * %P, * %Q) { %0: br i1 %C.upgrd.1, label %T, label %F %F: store i32 0, * %P, align 4 br label %C %T: store i32 1, * %Q, align 4 store i32 0, * %P, align 4 br label %C %C: %V = load i32, * %P, align 4 ret i32 %V } => define i32 @test10(i1 %C.upgrd.1, * %P, * %Q) { %0: br i1 %C.upgrd.1, label %T, label %F %F: br label %C %T: store i32 1, * %Q, align 4 br label %C %C: store i32 0, * %P, align 4 ret i32 0 } Transformation seems to be correct! ---------------------------------------- define double @test11(* %p) { %0: %t0 = gep * %p, 8 x i32 1 store double 2.000000, * %t0, align 8 %t1 = gep * %p, 8 x i32 1 %x = load double, * %t1, align 8 ret double %x } => define double @test11(* %p) { %0: %t0 = gep * %p, 8 x i64 1 store double 2.000000, * %t0, align 8 ret double 2.000000 } Transformation seems to be correct! ---------------------------------------- define i32 @test12(* %P) { %0: %A = alloca i64 4, align 4 store i32 123, * %A, align 4 %Q = bitcast * %A to * %V = load i32, * %Q, align 4 ret i32 %V } => define i32 @test12(* %P) { %0: ret i32 123 } Transformation seems to be correct! ---------------------------------------- @GLOBAL = constant 16 bytes, align 4 define <16 x i8> @test13(<2 x i64> %x) { #init: store [4 x i32] { 0, 0, 0, 0 }, * @GLOBAL, align 4 br label %0 %0: %__constexpr_0 = bitcast * @GLOBAL to * %tmp = load <16 x i8>, * %__constexpr_0, align 16 ret <16 x i8> %tmp } => @GLOBAL = constant 16 bytes, align 4 define <16 x i8> @test13(<2 x i64> %x) { #init: store [4 x i32] { 0, 0, 0, 0 }, * @GLOBAL, align 4 br label %0 %0: ret <16 x i8> { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } } Transformation seems to be correct! ---------------------------------------- define i8 @test14(i8 %x, i32 %y) { %0: %a = alloca i64 4, align 4 %a.i8 = bitcast * %a to * store i8 %x, * %a.i8, align 1 store i32 %y, * %a, align 4 %r = load i8, * %a.i8, align 1 ret i8 %r } => define i8 @test14(i8 %x, i32 %y) { %0: %a = alloca i64 4, align 4 %a.i8 = bitcast * %a to * store i8 %x, * %a.i8, align 4 store i32 %y, * %a, align 4 %r = load i8, * %a.i8, align 4 ret i8 %r } Transformation seems to be correct! ---------------------------------------- @test15_global = global 4 bytes, align 4 define i8 @test15(i8 %x, i32 %y) { %0: %g.i8 = bitcast * @test15_global to * store i8 %x, * %g.i8, align 1 store i32 %y, * @test15_global, align 4 %r = load i8, * %g.i8, align 1 ret i8 %r } => @test15_global = global 4 bytes, align 4 define i8 @test15(i8 %x, i32 %y) { %0: %__constexpr_0 = bitcast * @test15_global to * store i8 %x, * %__constexpr_0, align 4 store i32 %y, * @test15_global, align 4 %__constexpr_1 = bitcast * @test15_global to * %r = load i8, * %__constexpr_1, align 4 ret i8 %r } Transformation seems to be correct! ---------------------------------------- define void @test16(* %x, * %a, * %b, * %c) { %entry: %x.cast = bitcast * %x to * %a.cast = bitcast * %a to * %b.cast = bitcast * %b to * %c.cast = bitcast * %c to * %x1 = load float, * %x.cast, align 4 store float %x1, * %a.cast, align 4 store float %x1, * %b.cast, align 4 %x2 = load float, * %x.cast, align 4 store float %x2, * %b.cast, align 4 %x2.cast = bitcast float %x2 to i32 store i32 %x2.cast, * %c.cast, align 4 ret void } => define void @test16(* %x, * %a, * %b, * %c) { %entry: %0 = bitcast * %x to * %x11 = load i32, * %0, align 4 %1 = bitcast * %a to * store i32 %x11, * %1, align 4 %2 = bitcast * %b to * store i32 %x11, * %2, align 4 %3 = bitcast * %x to * %x22 = load i32, * %3, align 4 %4 = bitcast * %b to * store i32 %x22, * %4, align 4 %5 = bitcast * %c to * store i32 %x22, * %5, align 4 ret void } Transformation doesn't verify! ERROR: Timeout ---------------------------------------- define void @test16-vect(* %x, * %a, * %b, * %c) { %entry: %x.cast = bitcast * %x to * %a.cast = bitcast * %a to * %b.cast = bitcast * %b to * %c.cast = bitcast * %c to * %x1 = load <4 x i8>, * %x.cast, align 4 store <4 x i8> %x1, * %a.cast, align 4 store <4 x i8> %x1, * %b.cast, align 4 %x2 = load <4 x i8>, * %x.cast, align 4 store <4 x i8> %x2, * %b.cast, align 4 %x2.cast = bitcast <4 x i8> %x2 to i32 store i32 %x2.cast, * %c.cast, align 4 ret void } => define void @test16-vect(* %x, * %a, * %b, * %c) { %entry: %0 = bitcast * %x to * %x11 = load i32, * %0, align 4 %1 = bitcast * %a to * store i32 %x11, * %1, align 4 %2 = bitcast * %b to * store i32 %x11, * %2, align 4 %3 = bitcast * %x to * %x22 = load i32, * %3, align 4 %4 = bitcast * %b to * store i32 %x22, * %4, align 4 %5 = bitcast * %c to * store i32 %x22, * %5, align 4 ret void } Transformation doesn't verify! ERROR: Mismatch in memory Example: * %x = pointer(non-local, block_id=1, offset=0) * %a = pointer(non-local, block_id=4, offset=0) * %b = pointer(non-local, block_id=3, offset=0) * %c = pointer(non-local, block_id=2, offset=0) Source: * %x.cast = pointer(non-local, block_id=1, offset=0) * %a.cast = pointer(non-local, block_id=4, offset=0) * %b.cast = pointer(non-local, block_id=3, offset=0) * %c.cast = pointer(non-local, block_id=2, offset=0) <4 x i8> %x1 = < #x00 (0), #x00 (0), poison, #x00 (0) > <4 x i8> %x2 = < #x00 (0), #x00 (0), poison, #x00 (0) > i32 %x2.cast = poison SOURCE MEMORY STATE =================== NON-LOCAL BLOCKS: Block 0 > size: 0 align: 64 alloc type: 0 Block 1 > size: 10 align: 0 alloc type: 0 Block 2 > size: 4 align: 0 alloc type: 0 Block 3 > size: 8 align: 0 alloc type: 0 Block 4 > size: 8 align: 131072 alloc type: 0 Target: * %0 = pointer(non-local, block_id=1, offset=0) i32 %x11 = poison * %1 = pointer(non-local, block_id=4, offset=0) * %2 = pointer(non-local, block_id=3, offset=0) * %3 = pointer(non-local, block_id=1, offset=0) i32 %x22 = poison * %4 = pointer(non-local, block_id=3, offset=0) * %5 = pointer(non-local, block_id=2, offset=0) Mismatch in pointer(non-local, block_id=3, offset=3) Source value: #x00 Target value: poison ------------------- SMT STATS ------------------- Num queries: 34 Num invalid: 0 Num skips: 0 Num trivial: 51 (60.0%) Num timeout: 1 (2.9%) Num errors: 0 (0.0%) Num SAT: 18 (52.9%) Num UNSAT: 15 (44.1%)
+ : 'RUN: at line 2' + /home/nlopes/alive2/scripts/opt-alive.sh -instcombine -S + /home/nlopes/llvm/build/bin/FileCheck /home/nlopes/llvm/llvm/test/Transforms/InstCombine/load.ll Alive2: Transform doesn't verify; aborting! FileCheck error: '<stdin>' is empty. FileCheck command line: /home/nlopes/llvm/build/bin/FileCheck /home/nlopes/llvm/llvm/test/Transforms/InstCombine/load.ll