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, undef, #x00000000 (0), #x00000000 (0) >

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

Target:
<4 x i1> %1 = < #x0 (0), #x0 (0), #x1 (1), #x1 (1) >
<4 x i32> %2 = < #x00000003 (3), #xfffffffe (4294967294, -2), #x00000003 (3), #x00000003 (3) >
<4 x i32> %3 = < #x00000003 (3), #xfffffffe (4294967294, -2), #x00000000 (0), #x00000000 (0) >
Source value: < #x00000000 (0), #x00000000 (0), #x00000000 (0), #x00000000 (0) >
Target value: < #x00000003 (3), #xfffffffe (4294967294, -2), #x00000000 (0), #x00000000 (0) >


------------------- SMT STATS -------------------
Num queries: 33
Num invalid: 0
Num skips:   0
Num trivial: 50 (60.2%)
Num timeout: 0 (0.0%)
Num errors:  0 (0.0%)
Num SAT:     21 (63.6%)
Num UNSAT:   12 (36.4%)
Alive2: Transform doesn't verify; aborting!

stderr:

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

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

 

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

 

<-- Back