Test source: git
Source: /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/load-gep-overalign.ll -- 1. ModuleToFunctionPassAdaptor -- 1. PassManager<Function> : Skipping NOP -- 2. InstCombinePass ---------------------------------------- @foo = constant 8 bytes, align 8 define void @test_vector_load_i8() { #init: store <4 x i16> { 8961, 26437, 43913, 61389 }, ptr @foo, align 8 br label %0 %0: %ptr0 = gep ptr @foo, 1 x i64 0 %res0 = load i8, ptr %ptr0, align 1 call void @report(i64 0, i8 %res0) %ptr1 = gep ptr @foo, 1 x i64 1 %res1 = load i8, ptr %ptr1, align 1 call void @report(i64 1, i8 %res1) %ptr2 = gep ptr @foo, 1 x i64 2 %res2 = load i8, ptr %ptr2, align 1 call void @report(i64 2, i8 %res2) %ptr3 = gep ptr @foo, 1 x i64 3 %res3 = load i8, ptr %ptr3, align 1 call void @report(i64 3, i8 %res3) %ptr4 = gep ptr @foo, 1 x i64 4 %res4 = load i8, ptr %ptr4, align 1 call void @report(i64 4, i8 %res4) %ptr5 = gep ptr @foo, 1 x i64 5 %res5 = load i8, ptr %ptr5, align 1 call void @report(i64 5, i8 %res5) %ptr6 = gep ptr @foo, 1 x i64 6 %res6 = load i8, ptr %ptr6, align 1 call void @report(i64 6, i8 %res6) %ptr7 = gep ptr @foo, 1 x i64 7 %res7 = load i8, ptr %ptr7, align 1 call void @report(i64 7, i8 %res7) ret void } Transformation seems to be correct! (syntactically equal) -- 3. InstCombinePass ---------------------------------------- @foo = constant 8 bytes, align 8 define void @test_vector_load_i8() { #init: store <4 x i16> { 8961, 26437, 43913, 61389 }, ptr @foo, align 8 br label %0 %0: %ptr0 = gep ptr @foo, 1 x i64 0 %res0 = load i8, ptr %ptr0, align 1 call void @report(i64 0, i8 %res0) %ptr1 = gep ptr @foo, 1 x i64 1 %res1 = load i8, ptr %ptr1, align 1 call void @report(i64 1, i8 %res1) %ptr2 = gep ptr @foo, 1 x i64 2 %res2 = load i8, ptr %ptr2, align 1 call void @report(i64 2, i8 %res2) %ptr3 = gep ptr @foo, 1 x i64 3 %res3 = load i8, ptr %ptr3, align 1 call void @report(i64 3, i8 %res3) %ptr4 = gep ptr @foo, 1 x i64 4 %res4 = load i8, ptr %ptr4, align 1 call void @report(i64 4, i8 %res4) %ptr5 = gep ptr @foo, 1 x i64 5 %res5 = load i8, ptr %ptr5, align 1 call void @report(i64 5, i8 %res5) %ptr6 = gep ptr @foo, 1 x i64 6 %res6 = load i8, ptr %ptr6, align 1 call void @report(i64 6, i8 %res6) %ptr7 = gep ptr @foo, 1 x i64 7 %res7 = load i8, ptr %ptr7, align 1 call void @report(i64 7, i8 %res7) ret void } => @foo = constant 8 bytes, align 8 define void @test_vector_load_i8() { #init: store <4 x i16> { 8961, 26437, 43913, 61389 }, ptr @foo, align 8 br label %0 %0: call void @report(i64 0, i8 1) call void @report(i64 1, i8 35) call void @report(i64 2, i8 0) call void @report(i64 3, i8 0) call void @report(i64 4, i8 69) call void @report(i64 5, i8 103) call void @report(i64 6, i8 0) call void @report(i64 7, i8 0) ret void } Transformation doesn't verify! (unsound) ERROR: Source is more defined than target Example: Source: >> Jump to %0 ptr %ptr0 = pointer(non-local, block_id=1, offset=0) i8 %res0 = #x01 (1) Function @report returned ptr %ptr1 = pointer(non-local, block_id=1, offset=1) i8 %res1 = #x23 (35) Function @report returned ptr %ptr2 = pointer(non-local, block_id=1, offset=2) i8 %res2 = #x45 (69) Function @report returned ptr %ptr3 = pointer(non-local, block_id=1, offset=3) i8 %res3 = #x67 (103) Function @report returned ptr %ptr4 = pointer(non-local, block_id=1, offset=4) i8 %res4 = #x89 (137, -119) Function @report returned ptr %ptr5 = pointer(non-local, block_id=1, offset=5) i8 %res5 = #xab (171, -85) Function @report returned ptr %ptr6 = pointer(non-local, block_id=1, offset=6) i8 %res6 = #xcd (205, -51) Function @report returned ptr %ptr7 = pointer(non-local, block_id=1, offset=7) i8 %res7 = #xef (239, -17) Function @report returned SOURCE MEMORY STATE =================== NON-LOCAL BLOCKS: Block 0 > size: 0 align: 1 alloc type: 0 address: 0 Block 1 > size: 8 align: 8 alloc type: 0 address: 120 Block 2 > size: 0 align: 1 alloc type: 0 address: 0 Target: >> Jump to %0 Function @report returned Function @report returned Function @report triggered UB Function @report triggered UB Function @report triggered UB Function @report triggered UB Function @report triggered UB Function @report triggered UB Pass: InstCombinePass Command line: '/home/nlopes/llvm/build/bin/opt' '-load=/home/nlopes/alive2/build/tv/tv.so' '-load-pass-plugin=/home/nlopes/alive2/build/tv/tv.so' '-tv-exit-on-error' '--data-layout=i16:32' '-passes=instcombine' '-S' '/bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/load-gep-overalign.ll' '-tv-smt-to=20000' '-tv-report-dir=/home/nlopes/alive2/build/logs' '-tv-smt-stats' Wrote bitcode to: "/home/nlopes/alive2/build/logs/load-gep-overalign_VPvYheXl_NR8C.bc" ------------------- SMT STATS ------------------- Num queries: 4 Num invalid: 0 Num skips: 0 Num trivial: 16 (80.0%) Num timeout: 0 (0.0%) Num errors: 0 (0.0%) Num SAT: 4 (100.0%) Num UNSAT: 0 (0.0%) Alive2: Transform doesn't verify; aborting!
+ : 'RUN: at line 2' + /home/nlopes/alive2/build/opt-alive.sh -passes=instcombine -S /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/load-gep-overalign.ll + /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/load-gep-overalign.ll --check-prefix=NATURAL + : 'RUN: at line 3' + /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/load-gep-overalign.ll --check-prefix=OVERALIGNED + /home/nlopes/alive2/build/opt-alive.sh --data-layout=i16:32 -passes=instcombine -S /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/load-gep-overalign.ll FileCheck error: '<stdin>' is empty. FileCheck command line: /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/load-gep-overalign.ll --check-prefix=OVERALIGNED