Test source: git
Comments: LLVM PR51669
Source: <stdin> -- 1. NewPMDebugifyPass -- 2. NewPMDebugifyPass ---------------------------------------- declare void @escape_inner(i8, i8, i8, i1, i8) declare void @escape_outer(i8, i8, i8, i1, i8) define i8 @p(i8 %val, i8 %start, i8 %extraoffset) { entry: br label %loop loop: %iv = phi i8 [ %start, %entry ], [ %iv.next, %loop ] %nbits = add nsw i8 %iv, %extraoffset %val.shifted = lshr i8 %val, %nbits %val.shifted.iszero = icmp eq i8 %val.shifted, 0 %iv.next = add i8 %iv, 1 call void @escape_inner(i8 %iv, i8 %nbits, i8 %val.shifted, i1 %val.shifted.iszero, i8 %iv.next) br i1 %val.shifted.iszero, label %end, label %loop end: %iv.res = phi i8 [ %iv, %loop ] %nbits.res = phi i8 [ %nbits, %loop ] %val.shifted.res = phi i8 [ %val.shifted, %loop ] %val.shifted.iszero.res = phi i1 [ %val.shifted.iszero, %loop ] %iv.next.res = phi i8 [ %iv.next, %loop ] call void @escape_outer(i8 %iv.res, i8 %nbits.res, i8 %val.shifted.res, i1 %val.shifted.iszero.res, i8 %iv.next.res) ret i8 %iv.res } Transformation seems to be correct! (syntactically equal) -- 3. ModuleToFunctionPassAdaptor ---------------------------------------- declare void @escape_inner(i8, i8, i8, i1, i8) declare void @escape_outer(i8, i8, i8, i1, i8) define i8 @p(i8 %val, i8 %start, i8 %extraoffset) { entry: br label %loop loop: %iv = phi i8 [ %start, %entry ], [ %iv.next, %loop ] %nbits = add nsw i8 %iv, %extraoffset %val.shifted = lshr i8 %val, %nbits %val.shifted.iszero = icmp eq i8 %val.shifted, 0 %iv.next = add i8 %iv, 1 call void @escape_inner(i8 %iv, i8 %nbits, i8 %val.shifted, i1 %val.shifted.iszero, i8 %iv.next) br i1 %val.shifted.iszero, label %end, label %loop end: %iv.res = phi i8 [ %iv, %loop ] %nbits.res = phi i8 [ %nbits, %loop ] %val.shifted.res = phi i8 [ %val.shifted, %loop ] %val.shifted.iszero.res = phi i1 [ %val.shifted.iszero, %loop ] %iv.next.res = phi i8 [ %iv.next, %loop ] call void @escape_outer(i8 %iv.res, i8 %nbits.res, i8 %val.shifted.res, i1 %val.shifted.iszero.res, i8 %iv.next.res) ret i8 %iv.res } Transformation seems to be correct! (syntactically equal) -- 1. FunctionToLoopPassAdaptor ---------------------------------------- declare void @escape_inner(i8, i8, i8, i1, i8) declare void @escape_outer(i8, i8, i8, i1, i8) define i8 @p(i8 %val, i8 %start, i8 %extraoffset) { entry: br label %loop loop: %iv = phi i8 [ %start, %entry ], [ %iv.next, %loop ] %nbits = add nsw i8 %iv, %extraoffset %val.shifted = lshr i8 %val, %nbits %val.shifted.iszero = icmp eq i8 %val.shifted, 0 %iv.next = add i8 %iv, 1 call void @escape_inner(i8 %iv, i8 %nbits, i8 %val.shifted, i1 %val.shifted.iszero, i8 %iv.next) br i1 %val.shifted.iszero, label %end, label %loop end: %iv.res = phi i8 [ %iv, %loop ] %nbits.res = phi i8 [ %nbits, %loop ] %val.shifted.res = phi i8 [ %val.shifted, %loop ] %val.shifted.iszero.res = phi i1 [ %val.shifted.iszero, %loop ] %iv.next.res = phi i8 [ %iv.next, %loop ] call void @escape_outer(i8 %iv.res, i8 %nbits.res, i8 %val.shifted.res, i1 %val.shifted.iszero.res, i8 %iv.next.res) ret i8 %iv.res } Transformation seems to be correct! (syntactically equal) -- 2. PassManager<Function> : Skipping NOP -- 3. LoopSimplifyPass ---------------------------------------- declare void @escape_inner(i8, i8, i8, i1, i8) declare void @escape_outer(i8, i8, i8, i1, i8) define i8 @p(i8 %val, i8 %start, i8 %extraoffset) { entry: br label %loop loop: %iv = phi i8 [ %start, %entry ], [ %iv.next, %loop ] %nbits = add nsw i8 %iv, %extraoffset %val.shifted = lshr i8 %val, %nbits %val.shifted.iszero = icmp eq i8 %val.shifted, 0 %iv.next = add i8 %iv, 1 call void @escape_inner(i8 %iv, i8 %nbits, i8 %val.shifted, i1 %val.shifted.iszero, i8 %iv.next) br i1 %val.shifted.iszero, label %end, label %loop end: %iv.res = phi i8 [ %iv, %loop ] %nbits.res = phi i8 [ %nbits, %loop ] %val.shifted.res = phi i8 [ %val.shifted, %loop ] %val.shifted.iszero.res = phi i1 [ %val.shifted.iszero, %loop ] %iv.next.res = phi i8 [ %iv.next, %loop ] call void @escape_outer(i8 %iv.res, i8 %nbits.res, i8 %val.shifted.res, i1 %val.shifted.iszero.res, i8 %iv.next.res) ret i8 %iv.res } Transformation seems to be correct! (syntactically equal) -- 4. LoopSimplifyPass ---------------------------------------- declare void @escape_inner(i8, i8, i8, i1, i8) declare void @escape_outer(i8, i8, i8, i1, i8) define i8 @p(i8 %val, i8 %start, i8 %extraoffset) { entry: br label %loop loop: %iv = phi i8 [ %start, %entry ], [ %iv.next, %loop ] %nbits = add nsw i8 %iv, %extraoffset %val.shifted = lshr i8 %val, %nbits %val.shifted.iszero = icmp eq i8 %val.shifted, 0 %iv.next = add i8 %iv, 1 call void @escape_inner(i8 %iv, i8 %nbits, i8 %val.shifted, i1 %val.shifted.iszero, i8 %iv.next) br i1 %val.shifted.iszero, label %end, label %loop end: %iv.res = phi i8 [ %iv, %loop ] %nbits.res = phi i8 [ %nbits, %loop ] %val.shifted.res = phi i8 [ %val.shifted, %loop ] %val.shifted.iszero.res = phi i1 [ %val.shifted.iszero, %loop ] %iv.next.res = phi i8 [ %iv.next, %loop ] call void @escape_outer(i8 %iv.res, i8 %nbits.res, i8 %val.shifted.res, i1 %val.shifted.iszero.res, i8 %iv.next.res) ret i8 %iv.res } Transformation seems to be correct! (syntactically equal) -- 5. LCSSAPass ---------------------------------------- declare void @escape_inner(i8, i8, i8, i1, i8) declare void @escape_outer(i8, i8, i8, i1, i8) define i8 @p(i8 %val, i8 %start, i8 %extraoffset) { entry: br label %loop loop: %iv = phi i8 [ %start, %entry ], [ %iv.next, %loop ] %nbits = add nsw i8 %iv, %extraoffset %val.shifted = lshr i8 %val, %nbits %val.shifted.iszero = icmp eq i8 %val.shifted, 0 %iv.next = add i8 %iv, 1 call void @escape_inner(i8 %iv, i8 %nbits, i8 %val.shifted, i1 %val.shifted.iszero, i8 %iv.next) br i1 %val.shifted.iszero, label %end, label %loop end: %iv.res = phi i8 [ %iv, %loop ] %nbits.res = phi i8 [ %nbits, %loop ] %val.shifted.res = phi i8 [ %val.shifted, %loop ] %val.shifted.iszero.res = phi i1 [ %val.shifted.iszero, %loop ] %iv.next.res = phi i8 [ %iv.next, %loop ] call void @escape_outer(i8 %iv.res, i8 %nbits.res, i8 %val.shifted.res, i1 %val.shifted.iszero.res, i8 %iv.next.res) ret i8 %iv.res } Transformation seems to be correct! (syntactically equal) -- 6. LCSSAPass ---------------------------------------- declare void @escape_inner(i8, i8, i8, i1, i8) declare void @escape_outer(i8, i8, i8, i1, i8) define i8 @p(i8 %val, i8 %start, i8 %extraoffset) { entry: br label %loop loop: %iv = phi i8 [ %start, %entry ], [ %iv.next, %loop ] %nbits = add nsw i8 %iv, %extraoffset %val.shifted = lshr i8 %val, %nbits %val.shifted.iszero = icmp eq i8 %val.shifted, 0 %iv.next = add i8 %iv, 1 call void @escape_inner(i8 %iv, i8 %nbits, i8 %val.shifted, i1 %val.shifted.iszero, i8 %iv.next) br i1 %val.shifted.iszero, label %end, label %loop end: %iv.res = phi i8 [ %iv, %loop ] %nbits.res = phi i8 [ %nbits, %loop ] %val.shifted.res = phi i8 [ %val.shifted, %loop ] %val.shifted.iszero.res = phi i1 [ %val.shifted.iszero, %loop ] %iv.next.res = phi i8 [ %iv.next, %loop ] call void @escape_outer(i8 %iv.res, i8 %nbits.res, i8 %val.shifted.res, i1 %val.shifted.iszero.res, i8 %iv.next.res) ret i8 %iv.res } Transformation seems to be correct! (syntactically equal) -- 7. PassManager<Function> : Skipping NOP -- 8. LoopIdiomRecognizePass ---------------------------------------- declare void @escape_inner(i8, i8, i8, i1, i8) declare void @escape_outer(i8, i8, i8, i1, i8) define i8 @p(i8 %val, i8 %start, i8 %extraoffset) { entry: br label %loop loop: %iv = phi i8 [ %start, %entry ], [ %iv.next, %loop ] %nbits = add nsw i8 %iv, %extraoffset %val.shifted = lshr i8 %val, %nbits %val.shifted.iszero = icmp eq i8 %val.shifted, 0 %iv.next = add i8 %iv, 1 call void @escape_inner(i8 %iv, i8 %nbits, i8 %val.shifted, i1 %val.shifted.iszero, i8 %iv.next) br i1 %val.shifted.iszero, label %end, label %loop end: %iv.res = phi i8 [ %iv, %loop ] %nbits.res = phi i8 [ %nbits, %loop ] %val.shifted.res = phi i8 [ %val.shifted, %loop ] %val.shifted.iszero.res = phi i1 [ %val.shifted.iszero, %loop ] %iv.next.res = phi i8 [ %iv.next, %loop ] call void @escape_outer(i8 %iv.res, i8 %nbits.res, i8 %val.shifted.res, i1 %val.shifted.iszero.res, i8 %iv.next.res) ret i8 %iv.res } Transformation seems to be correct! (syntactically equal) -- 9. LoopIdiomRecognizePass ---------------------------------------- declare void @escape_inner(i8, i8, i8, i1, i8) declare void @escape_outer(i8, i8, i8, i1, i8) define i8 @p(i8 %val, i8 %start, i8 %extraoffset) { entry: br label %loop loop: %iv = phi i8 [ %start, %entry ], [ %iv.next, %loop ] %nbits = add nsw i8 %iv, %extraoffset %val.shifted = lshr i8 %val, %nbits %val.shifted.iszero = icmp eq i8 %val.shifted, 0 %iv.next = add i8 %iv, 1 call void @escape_inner(i8 %iv, i8 %nbits, i8 %val.shifted, i1 %val.shifted.iszero, i8 %iv.next) br i1 %val.shifted.iszero, label %end, label %loop end: %iv.res = phi i8 [ %iv, %loop ] %nbits.res = phi i8 [ %nbits, %loop ] %val.shifted.res = phi i8 [ %val.shifted, %loop ] %val.shifted.iszero.res = phi i1 [ %val.shifted.iszero, %loop ] %iv.next.res = phi i8 [ %iv.next, %loop ] call void @escape_outer(i8 %iv.res, i8 %nbits.res, i8 %val.shifted.res, i1 %val.shifted.iszero.res, i8 %iv.next.res) ret i8 %iv.res } => declare void @escape_inner(i8, i8, i8, i1, i8) declare void @escape_outer(i8, i8, i8, i1, i8) define i8 @p(i8 %val, i8 %start, i8 %extraoffset) { entry: %val.numleadingzeros = ctlz i8 %val, 0 %val.numactivebits = sub nsw nuw i8 8, %val.numleadingzeros %#0 = sub i8 0, %extraoffset %val.numactivebits.offset = add nsw i8 %val.numactivebits, %#0 %iv.final = smax i8 %val.numactivebits.offset, %start %loop.backedgetakencount = sub nsw i8 %iv.final, %start %loop.tripcount = add nsw nuw i8 %loop.backedgetakencount, 1 br label %loop loop: %loop.iv = phi i8 [ 0, %entry ], [ %loop.iv.next, %loop ] %loop.iv.next = add nsw nuw i8 %loop.iv, 1 %loop.ivcheck = icmp eq i8 %loop.iv.next, %loop.tripcount %iv = add nsw i8 %loop.iv, %start %nbits = add nsw i8 %iv, %extraoffset %val.shifted = lshr i8 %val, %nbits %iv.next = add i8 %iv, 1 call void @escape_inner(i8 %iv, i8 %nbits, i8 %val.shifted, i1 %loop.ivcheck, i8 %iv.next) br i1 %loop.ivcheck, label %end, label %loop end: %iv.res = phi i8 [ %iv.final, %loop ] %nbits.res = phi i8 [ %nbits, %loop ] %val.shifted.res = phi i8 [ %val.shifted, %loop ] %val.shifted.iszero.res = phi i1 [ %loop.ivcheck, %loop ] %iv.next.res = phi i8 [ %iv.next, %loop ] call void @escape_outer(i8 %iv.res, i8 %nbits.res, i8 %val.shifted.res, i1 %val.shifted.iszero.res, i8 %iv.next.res) ret i8 %iv.res } Transformation doesn't verify! (unsound) ERROR: Source is more defined than target Example: i8 %val = undef i8 %start = #x7c (124) i8 %extraoffset = #x84 (132, -124) Source: >> Jump to %loop i8 %iv = #x7c (124) i8 %nbits = #x00 (0) i8 %val.shifted = #x00 (0) [based on undef value] i1 %val.shifted.iszero = #x1 (1) i8 %iv.next = #x7d (125) 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: 2 align: 1 alloc type: 0 alive: true address: 0 Target: i8 %val.numleadingzeros = #x08 (8) i8 %val.numactivebits = #x00 (0) i8 %#0 = #x7c (124) i8 %val.numactivebits.offset = #x7c (124) i8 %iv.final = #x7c (124) i8 %loop.backedgetakencount = #x00 (0) i8 %loop.tripcount = #x01 (1) >> Jump to %loop i8 %loop.iv = #x00 (0) i8 %loop.iv.next = #x01 (1) i1 %loop.ivcheck = #x1 (1) i8 %iv = #x7c (124) i8 %nbits = #x00 (0) i8 %val.shifted = #x00 (0) i8 %iv.next = #x7d (125) void = function did not return! Pass: LoopIdiomRecognizePass 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' '-passes=debugify,loop-idiom' '-mtriple=x86_64' '-mcpu=core-avx2' '-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_H4BLtFos_us4B.bc" ------------------- SMT STATS ------------------- Num queries: 45 Num invalid: 0 Num skips: 0 Num trivial: 22 (32.8%) Num timeout: 0 (0.0%) Num errors: 0 (0.0%) Num SAT: 38 (84.4%) Num UNSAT: 7 (15.6%) Alive2: Transform doesn't verify; aborting!
RUN: at line 2: /home/nlopes/alive2/build/opt-alive.sh -passes=debugify,loop-idiom -mtriple=x86_64 -mcpu=corei7 < /bitbucket/nlopes/llvm/llvm/test/Transforms/LoopIdiom/X86/logical-right-shift-until-zero-debuginfo.ll -S | /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/LoopIdiom/X86/logical-right-shift-until-zero-debuginfo.ll --check-prefixes=NOLZCNT + /home/nlopes/alive2/build/opt-alive.sh -passes=debugify,loop-idiom -mtriple=x86_64 -mcpu=corei7 -S + /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/LoopIdiom/X86/logical-right-shift-until-zero-debuginfo.ll --check-prefixes=NOLZCNT RUN: at line 3: /home/nlopes/alive2/build/opt-alive.sh -passes=debugify,loop-idiom -mtriple=x86_64 -mcpu=core-avx2 < /bitbucket/nlopes/llvm/llvm/test/Transforms/LoopIdiom/X86/logical-right-shift-until-zero-debuginfo.ll -S | /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/LoopIdiom/X86/logical-right-shift-until-zero-debuginfo.ll --check-prefixes=LZCNT + /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/LoopIdiom/X86/logical-right-shift-until-zero-debuginfo.ll --check-prefixes=LZCNT + /home/nlopes/alive2/build/opt-alive.sh -passes=debugify,loop-idiom -mtriple=x86_64 -mcpu=core-avx2 -S FileCheck error: '<stdin>' is empty. FileCheck command line: /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/LoopIdiom/X86/logical-right-shift-until-zero-debuginfo.ll --check-prefixes=LZCNT