Test source: git
Source: <stdin> -- 1. ModuleToFunctionPassAdaptor -- 1. PassManager<Function> : Skipping NOP -- 2. InstCombinePass ---------------------------------------- declare i16 @ffs(i16) declare void @sink(i16) define void @fold_ffs(i16 %x) { #0: %n0 = ffs i16 0 call void @sink(i16 %n0) %n1 = ffs i16 1 call void @sink(i16 %n1) %nx = ffs i16 %x call void @sink(i16 %nx) ret void } Transformation seems to be correct! (syntactically equal) -- 3. InstCombinePass ---------------------------------------- declare i16 @ffs(i16) declare void @sink(i16) define void @fold_ffs(i16 %x) { #0: %n0 = ffs i16 0 call void @sink(i16 %n0) %n1 = ffs i16 1 call void @sink(i16 %n1) %nx = ffs i16 %x call void @sink(i16 %nx) ret void } => declare void @sink(i16) define void @fold_ffs(i16 %x) { #0: call void @sink(i16 0) call void @sink(i16 1) %cttz = cttz i16 %x, 1 %#1 = add nsw nuw i16 %cttz, 1 %.not = icmp eq i16 %x, 0 %nx = select i1 %.not, i16 0, i16 %#1 call void @sink(i16 %nx) ret void } Transformation doesn't verify! (unsound) ERROR: Source is more defined than target Example: i16 %x = undef Source: i16 %n0 = #x0000 (0) Function @sink returned i16 %n1 = #x0001 (1) Function @sink returned i16 %nx = #x0000 (0) [based on undef value] void = function did not return! SOURCE MEMORY STATE =================== NON-LOCAL BLOCKS: Block 0 > size: 0 align: 1 alloc type: 0 alive: false address: 0 Block 1 > size: 3 align: 1 alloc type: 0 alive: true address: 1 Target: Function @sink returned Function @sink returned i16 %cttz = poison i16 %#1 = poison i1 %.not = #x1 (1) i16 %nx = #x0000 (0) void = function did not return! 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' '-mtriple=avr-linux' '-passes=instcombine' '-S' '-tv-smt-to=20000' '-tv-report-dir=/home/nlopes/alive2/build/logs' '-tv-smt-stats' Wrote bitcode to: "/home/nlopes/alive2/build/logs/in_GWaFYgDp_DAd4.bc" ------------------- SMT STATS ------------------- Num queries: 21 Num invalid: 0 Num skips: 0 Num trivial: 6 (22.2%) Num timeout: 0 (0.0%) Num errors: 0 (0.0%) Num SAT: 15 (71.4%) Num UNSAT: 6 (28.6%) Alive2: Transform doesn't verify; aborting!
RUN: at line 6: /home/nlopes/alive2/build/opt-alive.sh < /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/ffs-i16.ll -mtriple=avr-linux -passes=instcombine -S | /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/ffs-i16.ll --check-prefix=AVR + /home/nlopes/alive2/build/opt-alive.sh -mtriple=avr-linux -passes=instcombine -S + /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/ffs-i16.ll --check-prefix=AVR FileCheck error: '<stdin>' is empty. FileCheck command line: /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/ffs-i16.ll --check-prefix=AVR
NOTE: This test would pass if undef didn't exist!