Test source: git
Source: <stdin> ---------------------------------------- @Q = global 8 bytes, align 8 define double @test(i1 %c, ptr %p) { %entry: br i1 %c, label %if, label %end %if: %load = load i64, ptr @Q, align 8 br label %end %end: %phi = phi i64 [ 0, %entry ], [ %load, %if ] store i64 %phi, ptr %p, align 8 %cast = bitcast i64 %phi to double ret double %cast } => @Q = global 8 bytes, align 8 define double @test(i1 %c, ptr %p) { %entry: br i1 %c, label %if, label %end %if: %load1 = load double, ptr @Q, align 8 br label %end %end: %0 = phi double [ 0.000000, %entry ], [ %load1, %if ] store double %0, ptr %p, align 8 ret double %0 } Transformation doesn't verify! (unsound) ERROR: Mismatch in memory Example: i1 %c = #x1 (1) ptr %p = pointer(non-local, block_id=1, offset=0) Source: >> Jump to %if i64 %load = #x7ff0000000000001 (9218868437227405313) >> Jump to %end i64 %phi = #x7ff0000000000001 (9218868437227405313) double %cast = NaN SOURCE MEMORY STATE =================== NON-LOCAL BLOCKS: Block 0 > size: 0 align: 8 alloc type: 0 Block 1 > size: 8 align: 8 alloc type: 0 Block 2 > align: 2 alloc type: 0 Target: >> Jump to %if double %load1 = NaN >> Jump to %end double %0 = NaN Mismatch in pointer(non-local, block_id=1, offset=0) Source value: #x7ff0000000000001 Target value: #xfffffffffffffffe Pass: ModuleToFunctionPassAdaptor 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' '-S' '-passes=module(tv),function(instcombine),module(tv)' '-tv-smt-to=20000' '-tv-report-dir=/home/nlopes/alive2/build/logs' '-tv-smt-stats' ------------------- SMT STATS ------------------- Num queries: 6 Num invalid: 0 Num skips: 0 Num trivial: 10 (62.5%) Num timeout: 0 (0.0%) Num errors: 0 (0.0%) Num SAT: 4 (66.7%) Num UNSAT: 2 (33.3%) Alive2: Transform doesn't verify; aborting!
+ : 'RUN: at line 2' + /home/nlopes/alive2/build/opt-alive.sh -S -passes=instcombine + /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/bitcast-phi-uselistorder.ll FileCheck error: '<stdin>' is empty. FileCheck command line: /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/bitcast-phi-uselistorder.ll