Test Failure: Transforms/InstCombine/vector-urem.ll

Test source: git

Log:

Source: <stdin>

----------------------------------------
define <4 x i32> @test_v4i32_splatconst_pow2(<4 x i32> %a0) {
%0:
  %1 = urem <4 x i32> %a0, { 2, 2, 2, 2 }
  ret <4 x i32> %1
}
=>
define <4 x i32> @test_v4i32_splatconst_pow2(<4 x i32> %a0) {
%0:
  %1 = and <4 x i32> %a0, { 1, 1, 1, 1 }
  ret <4 x i32> %1
}
Transformation seems to be correct!


----------------------------------------
define <4 x i32> @test_v4i32_const_pow2(<4 x i32> %a0) {
%0:
  %1 = urem <4 x i32> %a0, { 1, 2, 4, 8 }
  ret <4 x i32> %1
}
=>
define <4 x i32> @test_v4i32_const_pow2(<4 x i32> %a0) {
%0:
  %1 = and <4 x i32> %a0, { 0, 1, 3, 7 }
  ret <4 x i32> %1
}
Transformation seems to be correct!


----------------------------------------
define <4 x i32> @test_v4i32_const_pow2_undef(<4 x i32> %a0) {
%0:
  %1 = urem <4 x i32> %a0, { 1, 2, 4, undef }
  ret <4 x i32> %1
}
=>
define <4 x i32> @test_v4i32_const_pow2_undef(<4 x i32> %a0) {
%0:
  ret <4 x i32> poison
}
Transformation seems to be correct!


----------------------------------------
define <4 x i32> @test_v4i32_one(<4 x i32> %a0) {
%0:
  %1 = urem <4 x i32> { 1, 1, 1, 1 }, %a0
  ret <4 x i32> %1
}
=>
define <4 x i32> @test_v4i32_one(<4 x i32> %a0) {
%0:
  %1 = icmp ne <4 x i32> %a0, { 1, 1, 1, 1 }
  %2 = zext <4 x i1> %1 to <4 x i32>
  ret <4 x i32> %2
}
Transformation seems to be correct!


----------------------------------------
define <4 x i32> @test_v4i32_one_undef(<4 x i32> %a0) {
%0:
  %1 = urem <4 x i32> { 1, 1, 1, undef }, %a0
  ret <4 x i32> %1
}
=>
define <4 x i32> @test_v4i32_one_undef(<4 x i32> %a0) {
%0:
  %1 = icmp ne <4 x i32> %a0, { 1, 1, 1, 1 }
  %2 = zext <4 x i1> %1 to <4 x i32>
  ret <4 x i32> %2
}
Transformation seems to be correct!


----------------------------------------
define <4 x i32> @test_v4i32_negconstsplat(<4 x i32> %a0) {
%0:
  %1 = urem <4 x i32> %a0, { 4294967293, 4294967293, 4294967293, 4294967293 }
  ret <4 x i32> %1
}
=>
define <4 x i32> @test_v4i32_negconstsplat(<4 x i32> %a0) {
%0:
  %1 = icmp ult <4 x i32> %a0, { 4294967293, 4294967293, 4294967293, 4294967293 }
  %2 = add <4 x i32> %a0, { 3, 3, 3, 3 }
  %3 = select <4 x i1> %1, <4 x i32> %a0, <4 x i32> %2
  ret <4 x i32> %3
}
Transformation doesn't verify!
ERROR: Value mismatch

Example:
<4 x i32> %a0 = < undef, #x00000000 (0), #x00000001 (1), undef >

Source:
<4 x i32> %1 = < #x00000000 (0)	[based on undef value], #x00000000 (0), #x00000001 (1), #x00000000 (0)	[based on undef value] >

Target:
<4 x i1> %1 = < #x0 (0), #x1 (1), #x1 (1), #x0 (0) >
<4 x i32> %2 = < #x00000002 (2), #x00000003 (3), #x00000004 (4), #xfffffffd (4294967293, -3) >
<4 x i32> %3 = < #x00000002 (2), #x00000000 (0), #x00000001 (1), #xfffffffd (4294967293, -3) >
Source value: < #x00000000 (0), #x00000000 (0), #x00000001 (1), #x00000000 (0) >
Target value: < #x00000002 (2), #x00000000 (0), #x00000001 (1), #xfffffffd (4294967293, -3) >


------------------- SMT STATS -------------------
Num queries: 21
Num invalid: 0
Num skips:   0
Num trivial: 50 (70.4%)
Num timeout: 0 (0.0%)
Num errors:  0 (0.0%)
Num SAT:     9 (42.9%)
Num UNSAT:   12 (57.1%)
Alive2: Transform doesn't verify; aborting!

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/vector-urem.ll

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

 

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

 

<-- Back