Test source: git
Source: <stdin> -- 1. ModuleToFunctionPassAdaptor -- 1. PassManager<Function> : Skipping NOP -- 2. InstSimplifyPass ---------------------------------------- define i64 @ctpop_1_shl(i64 %x) { %0: %v = shl i64 1, %x %cnt = ctpop i64 %v ret i64 %cnt } Transformation seems to be correct! (syntactically equal) -- 3. InstSimplifyPass ---------------------------------------- define i64 @ctpop_1_shl(i64 %x) { %0: %v = shl i64 1, %x %cnt = ctpop i64 %v ret i64 %cnt } => define i64 @ctpop_1_shl(i64 %x) { %0: ret i64 1 } Transformation seems to be correct! -- 4. PassManager<Function> : Skipping NOP -- 5. PassManager<Function> : Skipping NOP -- 6. InstSimplifyPass ---------------------------------------- define i32 @ctpop_imin_lshr(i32 %x) { %0: %v = lshr i32 2147483648, %x %cnt = ctpop i32 %v ret i32 %cnt } Transformation seems to be correct! (syntactically equal) -- 7. InstSimplifyPass ---------------------------------------- define i32 @ctpop_imin_lshr(i32 %x) { %0: %v = lshr i32 2147483648, %x %cnt = ctpop i32 %v ret i32 %cnt } => define i32 @ctpop_imin_lshr(i32 %x) { %0: ret i32 1 } Transformation seems to be correct! -- 8. PassManager<Function> : Skipping NOP -- 9. PassManager<Function> : Skipping NOP -- 10. InstSimplifyPass ---------------------------------------- define i16 @ctpop_x_and_negx(i16 %x) { %0: %v0 = sub i16 0, %x %v1 = and i16 %x, %v0 %cnt = ctpop i16 %v1 ret i16 %cnt } Transformation seems to be correct! (syntactically equal) -- 11. InstSimplifyPass ---------------------------------------- define i16 @ctpop_x_and_negx(i16 %x) { %0: %v0 = sub i16 0, %x %v1 = and i16 %x, %v0 %cnt = ctpop i16 %v1 ret i16 %cnt } Transformation seems to be correct! (syntactically equal) -- 12. PassManager<Function> : Skipping NOP -- 13. PassManager<Function> : Skipping NOP -- 14. InstSimplifyPass ---------------------------------------- define i8 @ctpop_x_nz_and_negx(i8 %x) { %0: %x1 = or i8 %x, 1 %v0 = sub i8 0, %x1 %v1 = and i8 %x1, %v0 %cnt = ctpop i8 %v1 ret i8 %cnt } Transformation seems to be correct! (syntactically equal) -- 15. InstSimplifyPass ---------------------------------------- define i8 @ctpop_x_nz_and_negx(i8 %x) { %0: %x1 = or i8 %x, 1 %v0 = sub i8 0, %x1 %v1 = and i8 %x1, %v0 %cnt = ctpop i8 %v1 ret i8 %cnt } => define i8 @ctpop_x_nz_and_negx(i8 %x) { %0: %x1 = or i8 %x, 1 %v0 = sub i8 0, %x1 %v1 = and i8 %x1, %v0 ret i8 %v1 } Transformation doesn't verify! (unsound) ERROR: Value mismatch Example: i8 %x = undef Source: i8 %x1 = #x01 (1) [based on undef value] i8 %v0 = #xff (255, -1) i8 %v1 = #x01 (1) [based on undef value] i8 %cnt = #x01 (1) Target: i8 %x1 = #x01 (1) i8 %v0 = #xff (255, -1) i8 %v1 = #xff (255, -1) Source value: #x01 (1) Target value: #xff (255, -1) Pass: InstSimplifyPass 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=instsimplify' '-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_U9KMHyu1_aqlP.bc" ------------------- SMT STATS ------------------- Num queries: 13 Num invalid: 0 Num skips: 0 Num trivial: 23 (63.9%) Num timeout: 0 (0.0%) Num errors: 0 (0.0%) Num SAT: 10 (76.9%) Num UNSAT: 3 (23.1%) Alive2: Transform doesn't verify; aborting!
+ : 'RUN: at line 2' + /home/nlopes/alive2/build/opt-alive.sh -passes=instsimplify -S + /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/InstSimplify/ctpop-pow2.ll FileCheck error: '<stdin>' is empty. FileCheck command line: /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/InstSimplify/ctpop-pow2.ll
NOTE: This test would pass if undef didn't exist!