Test source: git
Source: <stdin> ---------------------------------------- define i32 @main1(i32 %argc) { %0: %and = and i32 %argc, 1 %tobool = icmp ne i32 %and, 0 %and2 = and i32 %argc, 2 %tobool3 = icmp ne i32 %and2, 0 %or.cond = and i1 %tobool, %tobool3 %retval.0 = select i1 %or.cond, i32 2, i32 1 ret i32 %retval.0 } => define i32 @main1(i32 %argc) { %0: %1 = and i32 %argc, 3 %2 = icmp eq i32 %1, 3 %retval.0 = select i1 %2, i32 2, i32 1 ret i32 %retval.0 } Transformation seems to be correct! ---------------------------------------- define i32 @main1_logical(i32 %argc) { %0: %and = and i32 %argc, 1 %tobool = icmp ne i32 %and, 0 %and2 = and i32 %argc, 2 %tobool3 = icmp ne i32 %and2, 0 %or.cond = select i1 %tobool, i1 %tobool3, i1 0 %retval.0 = select i1 %or.cond, i32 2, i32 1 ret i32 %retval.0 } => define i32 @main1_logical(i32 %argc) { %0: %1 = and i32 %argc, 3 %2 = icmp eq i32 %1, 3 %retval.0 = select i1 %2, i32 2, i32 1 ret i32 %retval.0 } Transformation seems to be correct! ---------------------------------------- define i32 @main2(i32 %argc) { %0: %and = and i32 %argc, 1 %tobool = icmp eq i32 %and, 0 %and2 = and i32 %argc, 2 %tobool3 = icmp eq i32 %and2, 0 %or.cond = or i1 %tobool, %tobool3 %storemerge = select i1 %or.cond, i32 0, i32 1 ret i32 %storemerge } => define i32 @main2(i32 %argc) { %0: %1 = and i32 %argc, 3 %.not = icmp eq i32 %1, 3 %storemerge = zext i1 %.not to i32 ret i32 %storemerge } Transformation seems to be correct! ---------------------------------------- define i32 @main2_logical(i32 %argc) { %0: %and = and i32 %argc, 1 %tobool = icmp eq i32 %and, 0 %and2 = and i32 %argc, 2 %tobool3 = icmp eq i32 %and2, 0 %or.cond = select i1 %tobool, i1 1, i1 %tobool3 %storemerge = select i1 %or.cond, i32 0, i32 1 ret i32 %storemerge } => define i32 @main2_logical(i32 %argc) { %0: %1 = and i32 %argc, 3 %.not = icmp eq i32 %1, 3 %storemerge = zext i1 %.not to i32 ret i32 %storemerge } Transformation seems to be correct! ---------------------------------------- define i32 @main3(i32 %argc) { %0: %and = and i32 %argc, 7 %tobool = icmp eq i32 %and, 0 %and2 = and i32 %argc, 48 %tobool3 = icmp eq i32 %and2, 0 %and.cond = and i1 %tobool, %tobool3 %storemerge = select i1 %and.cond, i32 0, i32 1 ret i32 %storemerge } => define i32 @main3(i32 %argc) { %0: %1 = and i32 %argc, 55 %2 = icmp ne i32 %1, 0 %storemerge = zext i1 %2 to i32 ret i32 %storemerge } Transformation seems to be correct! ---------------------------------------- define i32 @main3_logical(i32 %argc) { %0: %and = and i32 %argc, 7 %tobool = icmp eq i32 %and, 0 %and2 = and i32 %argc, 48 %tobool3 = icmp eq i32 %and2, 0 %and.cond = select i1 %tobool, i1 %tobool3, i1 0 %storemerge = select i1 %and.cond, i32 0, i32 1 ret i32 %storemerge } => define i32 @main3_logical(i32 %argc) { %0: %1 = and i32 %argc, 55 %2 = icmp ne i32 %1, 0 %storemerge = zext i1 %2 to i32 ret i32 %storemerge } Transformation seems to be correct! ---------------------------------------- define i32 @main3b(i32 %argc) { %0: %and = and i32 %argc, 7 %tobool = icmp eq i32 %and, 0 %and2 = and i32 %argc, 16 %tobool3 = icmp ne i32 %and2, 16 %and.cond = and i1 %tobool, %tobool3 %storemerge = select i1 %and.cond, i32 0, i32 1 ret i32 %storemerge } => define i32 @main3b(i32 %argc) { %0: %1 = and i32 %argc, 23 %2 = icmp ne i32 %1, 0 %storemerge = zext i1 %2 to i32 ret i32 %storemerge } Transformation seems to be correct! ---------------------------------------- define i32 @main3b_logical(i32 %argc) { %0: %and = and i32 %argc, 7 %tobool = icmp eq i32 %and, 0 %and2 = and i32 %argc, 16 %tobool3 = icmp ne i32 %and2, 16 %and.cond = select i1 %tobool, i1 %tobool3, i1 0 %storemerge = select i1 %and.cond, i32 0, i32 1 ret i32 %storemerge } => define i32 @main3b_logical(i32 %argc) { %0: %1 = and i32 %argc, 23 %2 = icmp ne i32 %1, 0 %storemerge = zext i1 %2 to i32 ret i32 %storemerge } Transformation seems to be correct! ---------------------------------------- define i32 @main3e_like(i32 %argc, i32 %argc2, i32 %argc3) { %0: %and = and i32 %argc, %argc2 %tobool = icmp eq i32 %and, 0 %and2 = and i32 %argc, %argc3 %tobool3 = icmp eq i32 %and2, 0 %and.cond = and i1 %tobool, %tobool3 %storemerge = select i1 %and.cond, i32 0, i32 1 ret i32 %storemerge } => define i32 @main3e_like(i32 %argc, i32 %argc2, i32 %argc3) { %0: %1 = or i32 %argc2, %argc3 %2 = and i32 %1, %argc %3 = icmp ne i32 %2, 0 %storemerge = zext i1 %3 to i32 ret i32 %storemerge } Transformation seems to be correct! ---------------------------------------- define i32 @main3e_like_logical(i32 %argc, i32 %argc2, i32 %argc3) { %0: %and = and i32 %argc, %argc2 %tobool = icmp eq i32 %and, 0 %and2 = and i32 %argc, %argc3 %tobool3 = icmp eq i32 %and2, 0 %and.cond = select i1 %tobool, i1 %tobool3, i1 0 %storemerge = select i1 %and.cond, i32 0, i32 1 ret i32 %storemerge } => define i32 @main3e_like_logical(i32 %argc, i32 %argc2, i32 %argc3) { %0: %1 = or i32 %argc2, %argc3 %2 = and i32 %1, %argc %3 = icmp ne i32 %2, 0 %storemerge = zext i1 %3 to i32 ret i32 %storemerge } Transformation doesn't verify! ERROR: Target is more poisonous than source Example: i32 %argc = #xffffffff (4294967295, -1) i32 %argc2 = #xffffffff (4294967295, -1) i32 %argc3 = poison Source: i32 %and = #xffffffff (4294967295, -1) i1 %tobool = #x0 (0) i32 %and2 = poison i1 %tobool3 = poison i1 %and.cond = #x0 (0) i32 %storemerge = #x00000001 (1) Target: i32 %1 = poison i32 %2 = poison i1 %3 = poison i32 %storemerge = poison Source value: #x00000001 (1) Target value: poison ------------------- SMT STATS ------------------- Num queries: 34 Num invalid: 0 Num skips: 0 Num trivial: 40 (54.1%) Num timeout: 0 (0.0%) Num errors: 0 (0.0%) Num SAT: 11 (32.4%) Num UNSAT: 23 (67.6%) Alive2: Transform doesn't verify; aborting!
+ : 'RUN: at line 2' + /home/nlopes/alive2/build/opt-alive.sh -instcombine -S + /home/nlopes/llvm/build/bin/FileCheck /home/nlopes/llvm/llvm/test/Transforms/InstCombine/bit-checks.ll FileCheck error: '<stdin>' is empty. FileCheck command line: /home/nlopes/llvm/build/bin/FileCheck /home/nlopes/llvm/llvm/test/Transforms/InstCombine/bit-checks.ll