Test Failure: Transforms/InstCombine/select-pr39595.ll

Test source: git

Log:

Source: <stdin>

----------------------------------------
define i32 @foo(i32 %x, i32 %y) {
%0:
  %1 = xor i32 %x, 4294967295
  %2 = xor i32 %y, 4294967295
  %3 = icmp ugt i32 %1, %2
  %4 = select i1 %3, i32 %2, i32 %1
  ret i32 %4
}
=>
define i32 @foo(i32 %x, i32 %y) {
%0:
  %1 = icmp ugt i32 %x, %y
  %2 = select i1 %1, i32 %x, i32 %y
  %3 = xor i32 %2, 4294967295
  ret i32 %3
}
Transformation doesn't verify!
ERROR: Target's return value is more undefined

Example:
i32 %x = #xffffffff (4294967295, -1)
i32 %y = undef

Source:
i32 %1 = #x00000000 (0)
i32 %2 = #xffffffff (4294967295, -1)	[based on undef value]
i1 %3 = #x0 (0)
i32 %4 = #x00000000 (0)

Target:
i1 %1 = #x0 (0)
i32 %2 = #x00000000 (0)
i32 %3 = #xffffffff (4294967295, -1)
Source value: #x00000000 (0)
Target value: #xffffffff (4294967295, -1)


------------------- SMT STATS -------------------
Num queries: 4
Num invalid: 0
Num skips:   0
Num trivial: 13 (76.5%)
Num timeout: 1 (25.0%)
Num errors:  0 (0.0%)
Num SAT:     2 (50.0%)
Num UNSAT:   1 (25.0%)
Alive2: Transform doesn't verify; aborting!

stderr:

+ : 'RUN: at line 1'
+ /home/nlopes/alive2/build/opt-alive.sh -instcombine -S
+ /home/nlopes/llvm/build/bin/FileCheck /home/nlopes/llvm/llvm/test/Transforms/InstCombine/select-pr39595.ll

FileCheck error: '<stdin>' is empty.
FileCheck command line:  /home/nlopes/llvm/build/bin/FileCheck /home/nlopes/llvm/llvm/test/Transforms/InstCombine/select-pr39595.ll

 

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

 

<-- Back