Test Failure: Transforms/GVN/PRE/rle.ll

Test source: git

Log:

Source: <stdin>
ERROR: Unsupported instruction:   %__constexpr_0 = bitcast void ()* @helper to i8*
ERROR: Unsupported instruction:   %tmp = load i8, i8* bitcast (void ()* @helper to i8*), align 1
ERROR: Unsupported instruction:   tail call void @llvm.memcpy.p0i8.p1i8.i64(i8* %conv, i8 addrspace(1)* bitcast ({ i32, float, i32 } addrspace(1)* @GCst_as1 to i8 addrspace(1)*), i64 12, i1 false)
ERROR: Unsupported attribute: noalias
ERROR: Unsupported attribute: noalias
ERROR: Unsupported attribute: noalias

----------------------------------------
define i32 @test0(i32 %V, * %P) {
%0:
  store i32 %V, * %P, align 4
  %A = load i32, * %P, align 4
  ret i32 %A
}
=>
define i32 @test0(i32 %V, * %P) {
%0:
  store i32 %V, * %P, align 4
  ret i32 %V
}
Transformation seems to be correct!


----------------------------------------
define i8 @crash0({i32, i32} %A, * %P) {
%0:
  store {i32, i32} %A, * %P, align 4
  %X = bitcast * %P to *
  %Y = load i8, * %X, align 1
  ret i8 %Y
}
=>
define i8 @crash0({i32, i32} %A, * %P) {
%0:
  store {i32, i32} %A, * %P, align 4
  %X = bitcast * %P to *
  %Y = load i8, * %X, align 1
  ret i8 %Y
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define float @coerce_mustalias1(i32 %V, * %P) {
%0:
  store i32 %V, * %P, align 4
  %P2 = bitcast * %P to *
  %A = load float, * %P2, align 4
  ret float %A
}
=>
define float @coerce_mustalias1(i32 %V, * %P) {
%0:
  store i32 %V, * %P, align 4
  %1 = bitcast i32 %V to float
  ret float %1
}
Transformation seems to be correct!


----------------------------------------
define float @coerce_mustalias2(* %V, * %P) {
%0:
  store * %V, * %P, align 4
  %P2 = bitcast * %P to *
  %A = load float, * %P2, align 4
  ret float %A
}
=>
define float @coerce_mustalias2(* %V, * %P) {
%0:
  store * %V, * %P, align 4
  %1 = ptrtoint * %V to i32
  %2 = bitcast i32 %1 to float
  ret float %2
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define * @coerce_mustalias3(float %V, * %P) {
%0:
  store float %V, * %P, align 4
  %P2 = bitcast * %P to *
  %A = load *, * %P2, align 4
  ret * %A
}
=>
define * @coerce_mustalias3(float %V, * %P) {
%0:
  store float %V, * %P, align 4
  %1 = bitcast float %V to i32
  %2 = int2ptr i32 %1 to *
  ret * %2
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define float @coerce_mustalias4(* %P, i1 %cond) {
%0:
  %A = load i32, * %P, align 4
  %P2 = bitcast * %P to *
  %B = load float, * %P2, align 4
  br i1 %cond, label %T, label %F

%F:
  %X = bitcast i32 %A to float
  ret float %X

%T:
  ret float %B
}
=>
define float @coerce_mustalias4(* %P, i1 %cond) {
%0:
  %A = load i32, * %P, align 4
  %1 = bitcast i32 %A to float
  br i1 %cond, label %T, label %F

%F:
  ret float %1

%T:
  ret float %1
}
Transformation seems to be correct!


----------------------------------------
define i8 @coerce_mustalias5(i32 %V, * %P) {
%0:
  store i32 %V, * %P, align 4
  %P2 = bitcast * %P to *
  %A = load i8, * %P2, align 1
  ret i8 %A
}
=>
define i8 @coerce_mustalias5(i32 %V, * %P) {
%0:
  store i32 %V, * %P, align 4
  %1 = trunc i32 %V to i8
  ret i8 %1
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define float @coerce_mustalias6(i64 %V, * %P) {
%0:
  store i64 %V, * %P, align 4
  %P2 = bitcast * %P to *
  %A = load float, * %P2, align 4
  ret float %A
}
=>
define float @coerce_mustalias6(i64 %V, * %P) {
%0:
  store i64 %V, * %P, align 4
  %1 = trunc i64 %V to i32
  %2 = bitcast i32 %1 to float
  ret float %2
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define * @coerce_mustalias7(i64 %V, * %P) {
%0:
  store i64 %V, * %P, align 4
  %P2 = bitcast * %P to *
  %A = load *, * %P2, align 4
  ret * %A
}
=>
define * @coerce_mustalias7(i64 %V, * %P) {
%0:
  store i64 %V, * %P, align 4
  %1 = trunc i64 %V to i32
  %2 = int2ptr i32 %1 to *
  ret * %2
}
Transformation seems to be correct!


----------------------------------------
define i16 @memset_to_i16_local(* %A) {
%entry:
  %conv = bitcast * %A to *
  memset * %conv align 1, i8 1, i64 200
  %arrayidx = gep inbounds * %A, 2 x i64 42
  %tmp2 = load i16, * %arrayidx, align 2
  ret i16 %tmp2
}
=>
define i16 @memset_to_i16_local(* %A) {
%entry:
  %conv = bitcast * %A to *
  memset * %conv align 1, i8 1, i64 200
  ret i16 257
}
Transformation seems to be correct!


----------------------------------------
define float @memset_to_float_local(* %A, i8 %Val) {
%entry:
  %conv = bitcast * %A to *
  memset * %conv align 1, i8 %Val, i64 400
  %arrayidx = gep inbounds * %A, 4 x i64 42
  %tmp2 = load float, * %arrayidx, align 4
  ret float %tmp2
}
=>
define float @memset_to_float_local(* %A, i8 %Val) {
%entry:
  %conv = bitcast * %A to *
  memset * %conv align 1, i8 %Val, i64 400
  %0 = zext i8 %Val to i32
  %1 = shl i32 %0, 8
  %2 = or i32 %0, %1
  %3 = shl i32 %2, 16
  %4 = or i32 %2, %3
  %5 = bitcast i32 %4 to float
  ret float %5
}
Transformation doesn't verify!
ERROR: Value mismatch

Example:
* %A = pointer(non-local, block_id=1, offset=4)
i8 %Val = undef

Source:
* %conv = pointer(non-local, block_id=1, offset=4)
* %arrayidx = pointer(non-local, block_id=1, offset=172)
float %tmp2 = #x00000000 (+0.0)	[based on undef value]

SOURCE MEMORY STATE
===================
NON-LOCAL BLOCKS:
Block 0 >	size: 0	align: 1	alloc type: 0
Block 1 >	size: 2048	align: 4	alloc type: 0

Target:
* %conv = pointer(non-local, block_id=1, offset=4)
i32 %0 = #x00000001 (1)
i32 %1 = #x00000100 (256)
i32 %2 = #x00000100 (256)
i32 %3 = #x01000000 (16777216)
i32 %4 = #x01000100 (16777472)
float %5 = #x01000100 (0.000000000000?)
Source value: #x00000000 (+0.0)
Target value: #x01000100 (0.000000000000?)


------------------- SMT STATS -------------------
Num queries: 55
Num invalid: 0
Num skips:   0
Num trivial: 21 (27.6%)
Num timeout: 5 (9.1%)
Num errors:  0 (0.0%)
Num SAT:     13 (23.6%)
Num UNSAT:   37 (67.3%)

stderr:

+ : 'RUN: at line 1'
+ /home/nlopes/alive2/build/opt-alive.sh -data-layout=e-p:32:32:32-p1:16:16:16-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-n8:16:32 -basic-aa -gvn -S -dce
+ /home/nlopes/llvm/build/bin/FileCheck /home/nlopes/llvm/llvm/test/Transforms/GVN/PRE/rle.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/GVN/PRE/rle.ll

 

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

 

<-- Back