Test Failure: Transforms/Scalarizer/scatter-order.ll

Test source: git

Log:

Source: /home/nlopes/llvm/llvm/test/Transforms/Scalarizer/scatter-order.ll

----------------------------------------
define <2 x i32> @test1(i1 %b, <2 x i32> %i, <2 x i32> %j) {
%0:
  %res = select i1 %b, <2 x i32> %i, <2 x i32> %j
  ret <2 x i32> %res
}
=>
define <2 x i32> @test1(i1 %b, <2 x i32> %i, <2 x i32> %j) {
%0:
  %i.i0 = extractelement <2 x i32> %i, i32 0
  %j.i0 = extractelement <2 x i32> %j, i32 0
  %res.i0 = select i1 %b, i32 %i.i0, i32 %j.i0
  %i.i1 = extractelement <2 x i32> %i, i32 1
  %j.i1 = extractelement <2 x i32> %j, i32 1
  %res.i1 = select i1 %b, i32 %i.i1, i32 %j.i1
  %res.upto0 = insertelement <2 x i32> undef, i32 %res.i0, i32 0
  %res = insertelement <2 x i32> %res.upto0, i32 %res.i1, i32 1
  ret <2 x i32> %res
}
Transformation doesn't verify!
ERROR: Value mismatch

Example:
i1 %b = undef
<2 x i32> %i = < #x00001000 (4096), #x00020000 (131072) >
<2 x i32> %j = < #x00000000 (0), #x00000000 (0) >

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

Target:
i32 %i.i0 = #x00001000 (4096)
i32 %j.i0 = #x00000000 (0)
i32 %res.i0 = #x00000000 (0)
i32 %i.i1 = #x00020000 (131072)
i32 %j.i1 = #x00000000 (0)
i32 %res.i1 = #x00020000 (131072)
<2 x i32> %res.upto0 = < #x00000000 (0), #x00000000 (0) >
<2 x i32> %res = < #x00000000 (0), #x00020000 (131072) >
Source value: < #x00000000 (0), #x00000000 (0) >
Target value: < #x00000000 (0), #x00020000 (131072) >


------------------- SMT STATS -------------------
Num queries: 4
Num invalid: 0
Num skips:   0
Num trivial: 2 (33.3%)
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 /home/nlopes/llvm/llvm/test/Transforms/Scalarizer/scatter-order.ll -scalarizer -scalarize-load-store -S
+ /home/nlopes/llvm/build/bin/FileCheck /home/nlopes/llvm/llvm/test/Transforms/Scalarizer/scatter-order.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/Scalarizer/scatter-order.ll

 

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

 

<-- Back