Test Failure: Transforms/InstCombine/invert-variable-mask-in-masked-merge-scalar.ll

Test source: git

Log:

Source: <stdin>

----------------------------------------
define i4 @scalar(i4 %x, i4 %y, i4 %m) {
%0:
  %im = xor i4 %m, 15
  %n0 = xor i4 %x, %y
  %n1 = and i4 %n0, %im
  %r = xor i4 %n1, %y
  ret i4 %r
}
=>
define i4 @scalar(i4 %x, i4 %y, i4 %m) {
%0:
  %n0 = xor i4 %x, %y
  %1 = and i4 %n0, %m
  %r = xor i4 %1, %x
  ret i4 %r
}
Transformation doesn't verify!
ERROR: Value mismatch

Example:
i4 %x = undef
i4 %y = #x8 (8, -8)
i4 %m = #x2 (2)

Source:
i4 %im = #xd (13, -3)
i4 %n0 = undef
i4 %n1 = #x8 (8, -8)	[based on undef value]
i4 %r = #x0 (0)

Target:
i4 %n0 = #x8 (8, -8)
i4 %1 = #x0 (0)
i4 %r = #x3 (3)
Source value: #x0 (0)
Target value: #x3 (3)


------------------- SMT STATS -------------------
Num queries: 4
Num invalid: 0
Num skips:   0
Num trivial: 3 (42.9%)
Num timeout: 0 (0.0%)
Num errors:  0 (0.0%)
Num SAT:     3 (75.0%)
Num UNSAT:   1 (25.0%)

stderr:

+ : 'RUN: at line 2'
+ /home/nlopes/alive2/scripts/opt-alive.sh -instcombine -S
+ /home/nlopes/llvm/build/bin/FileCheck /home/nlopes/llvm/llvm/test/Transforms/InstCombine/invert-variable-mask-in-masked-merge-scalar.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/invert-variable-mask-in-masked-merge-scalar.ll

 

NOTE: This test would pass if undef didn't exist!

 

<-- Back