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:   %ttmp = 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
ERROR: Unsupported instruction:   %tmp6.1 = load atomic i8, i8* @global acquire, align 4

----------------------------------------
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 seems to be correct! (syntactically equal)


----------------------------------------
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 seems to be correct!


----------------------------------------
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
  %ttmp2 = load i16, * %arrayidx, align 2
  ret i16 %ttmp2
}
=>
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
  %ttmp2 = load float, * %arrayidx, align 4
  ret float %ttmp2
}
=>
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=0)
i8 %Val = undef

Source:
* %conv = pointer(non-local, block_id=1, offset=0)
* %arrayidx = pointer(non-local, block_id=1, offset=168)
float %ttmp2 = #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: 1024	align: 512	alloc type: 0

Target:
* %conv = pointer(non-local, block_id=1, offset=0)
i32 %0 = #x00000000 (0)
i32 %1 = #x00000000 (0)
i32 %2 = #x00000000 (0)
i32 %3 = #x00000000 (0)
i32 %4 = #x00000200 (512)
float %5 = #x00000200 (0.000000000000?)
Source value: #x00000000 (+0.0)
Target value: #x00000200 (0.000000000000?)


------------------- SMT STATS -------------------
Num queries: 47
Num invalid: 0
Num skips:   0
Num trivial: 36 (43.4%)
Num timeout: 3 (6.4%)
Num errors:  0 (0.0%)
Num SAT:     12 (25.5%)
Num UNSAT:   32 (68.1%)
Alive2: Transform doesn't verify; aborting!

stderr:

+ : 'RUN: at line 2'
+ /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 --check-prefixes=CHECK,LE

FileCheck error: '<stdin>' is empty.
FileCheck command line:  /home/nlopes/llvm/build/bin/FileCheck /home/nlopes/llvm/llvm/test/Transforms/GVN/PRE/rle.ll --check-prefixes=CHECK,LE

 

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

 

<-- Back