Test Failure: Transforms/InstCombine/exact.ll

Test source: git

Log:

Source: <stdin>

----------------------------------------
define i32 @sdiv1(i32 %x) {
%0:
  %y = sdiv i32 %x, 8
  ret i32 %y
}
=>
define i32 @sdiv1(i32 %x) {
%0:
  %y = sdiv i32 %x, 8
  ret i32 %y
}
Transformation seems to be correct! (syntactically equal)


----------------------------------------
define i32 @sdiv2(i32 %x) {
%0:
  %y = sdiv exact i32 %x, 8
  ret i32 %y
}
=>
define i32 @sdiv2(i32 %x) {
%0:
  %y = ashr exact i32 %x, 3
  ret i32 %y
}
Transformation seems to be correct!


----------------------------------------
define <2 x i32> @sdiv2_vec(<2 x i32> %x) {
%0:
  %y = sdiv exact <2 x i32> %x, { 128, 128 }
  ret <2 x i32> %y
}
=>
define <2 x i32> @sdiv2_vec(<2 x i32> %x) {
%0:
  %y = ashr exact <2 x i32> %x, { 7, 7 }
  ret <2 x i32> %y
}
Transformation seems to be correct!


----------------------------------------
define i32 @sdiv3(i32 %x) {
%0:
  %y = sdiv i32 %x, 3
  %z = mul i32 %y, 3
  ret i32 %z
}
=>
define i32 @sdiv3(i32 %x) {
%0:
  %1 = srem i32 %x, 3
  %z = sub i32 %x, %1
  ret i32 %z
}
Transformation doesn't verify!
ERROR: Value mismatch

Example:
i32 %x = undef

Source:
i32 %y = #x00000000 (0)	[based on undef value]
i32 %z = #x00000000 (0)

Target:
i32 %1 = #x00000000 (0)
i32 %z = #xffffffff (4294967295, -1)
Source value: #x00000000 (0)
Target value: #xffffffff (4294967295, -1)


------------------- SMT STATS -------------------
Num queries: 18
Num invalid: 0
Num skips:   0
Num trivial: 16 (47.1%)
Num timeout: 0 (0.0%)
Num errors:  0 (0.0%)
Num SAT:     11 (61.1%)
Num UNSAT:   7 (38.9%)
Alive2: Transform doesn't verify; aborting!

stderr:

+ : 'RUN: at line 2'
+ /home/nuno/llvm/build/bin/FileCheck /home/nuno/llvm/llvm/test/Transforms/InstCombine/exact.ll
+ /home/nuno/alive2/build/opt-alive.sh -passes=instcombine -S

FileCheck error: '<stdin>' is empty.
FileCheck command line:  /home/nuno/llvm/build/bin/FileCheck /home/nuno/llvm/llvm/test/Transforms/InstCombine/exact.ll

 

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

 

<-- Back