Test Failure: Transforms/InstCombine/zext-or-icmp.ll

Test source: git

Log:

Source: <stdin>

----------------------------------------
define i8 @zext_or_icmp_icmp(i8 %a, i8 %b) {
%0:
  %mask = and i8 %a, 1
  %toBool1 = icmp eq i8 %mask, 0
  %toBool2 = icmp eq i8 %b, 0
  %bothCond = or i1 %toBool1, %toBool2
  %zext = zext i1 %bothCond to i8
  ret i8 %zext
}
=>
define i8 @zext_or_icmp_icmp(i8 %a, i8 %b) {
%0:
  %mask = and i8 %a, 1
  %toBool2 = icmp eq i8 %b, 0
  %toBool22 = zext i1 %toBool2 to i8
  %1 = xor i8 %mask, 1
  %zext3 = or i8 %1, %toBool22
  ret i8 %zext3
}
Transformation seems to be correct!


----------------------------------------
define i8 @zext_or_icmp_icmp_logical(i8 %a, i8 %b) {
%0:
  %mask = and i8 %a, 1
  %toBool1 = icmp eq i8 %mask, 0
  %toBool2 = icmp eq i8 %b, 0
  %bothCond = select i1 %toBool1, i1 1, i1 %toBool2
  %zext = zext i1 %bothCond to i8
  ret i8 %zext
}
=>
define i8 @zext_or_icmp_icmp_logical(i8 %a, i8 %b) {
%0:
  %mask = and i8 %a, 1
  %toBool2 = icmp eq i8 %b, 0
  %toBool22 = zext i1 %toBool2 to i8
  %1 = xor i8 %mask, 1
  %zext3 = or i8 %1, %toBool22
  ret i8 %zext3
}
Transformation doesn't verify!
ERROR: Target is more poisonous than source

Example:
i8 %a = #x00 (0)
i8 %b = poison

Source:
i8 %mask = #x00 (0)
i1 %toBool1 = #x1 (1)
i1 %toBool2 = poison
i1 %bothCond = #x1 (1)
i8 %zext = #x01 (1)

Target:
i8 %mask = #x00 (0)
i1 %toBool2 = poison
i8 %toBool22 = poison
i8 %1 = #x01 (1)
i8 %zext3 = poison
Source value: #x01 (1)
Target value: poison


------------------- SMT STATS -------------------
Num queries: 5
Num invalid: 0
Num skips:   0
Num trivial: 6 (54.5%)
Num timeout: 0 (0.0%)
Num errors:  0 (0.0%)
Num SAT:     3 (60.0%)
Num UNSAT:   2 (40.0%)

stderr:

+ : '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/zext-or-icmp.ll

Alive2: Transform doesn't verify; aborting!
FileCheck error: '<stdin>' is empty.
FileCheck command line:  /home/nlopes/llvm/build/bin/FileCheck /home/nlopes/llvm/llvm/test/Transforms/InstCombine/zext-or-icmp.ll

 

<-- Back