Test source: git
Source: <stdin> -- 1. ModuleToFunctionPassAdaptor -- 1. PassManager<Function> : Skipping NOP -- 2. CorrelatedValuePropagationPass ---------------------------------------- define i16 @sel_true_cond(i16 %x) { %0: %sub = usub_sat i16 %x, 10 %cmp = icmp uge i16 %x, 10 %sel = select i1 %cmp, i16 %sub, i16 42 ret i16 %sel } Transformation seems to be correct! (syntactically equal) -- 3. CorrelatedValuePropagationPass ---------------------------------------- define i16 @sel_true_cond(i16 %x) { %0: %sub = usub_sat i16 %x, 10 %cmp = icmp uge i16 %x, 10 %sel = select i1 %cmp, i16 %sub, i16 42 ret i16 %sel } => define i16 @sel_true_cond(i16 %x) { %0: %sub1 = sub nuw i16 %x, 10 %cmp = icmp uge i16 %x, 10 %sel = select i1 %cmp, i16 %sub1, i16 42 ret i16 %sel } Transformation doesn't verify! (unsound) ERROR: Target is more poisonous than source Example: i16 %x = undef Source: i16 %sub = #x0000 (0) [based on undef value] i1 %cmp = #x0 (0) [based on undef value] i16 %sel = #x002a (42) Target: i16 %sub1 = poison i1 %cmp = #x1 (1) i16 %sel = poison Source value: #x002a (42) Target value: poison Pass: CorrelatedValuePropagationPass 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=correlated-propagation' '-tv-smt-to=20000' '-tv-report-dir=/home/nlopes/alive2/build/logs' '-tv-smt-stats' Wrote bitcode to: "/home/nlopes/alive2/build/logs/in_XykVXMm1_BpQz.bc" ------------------- SMT STATS ------------------- Num queries: 4 Num invalid: 0 Num skips: 0 Num trivial: 8 (66.7%) 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 -S -passes=correlated-propagation + /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/CorrelatedValuePropagation/cond-at-use.ll FileCheck error: '<stdin>' is empty. FileCheck command line: /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/CorrelatedValuePropagation/cond-at-use.ll
NOTE: This test would pass if undef didn't exist!