Test Failure: Transforms/InstCombine/getelementptr.ll

Test source: git

Log:

Source: <stdin>
ERROR: Unsupported instruction:   %A = getelementptr [10 x i8], [10 x i8] addrspace(1)* @Global_as1, i16 0, i16 4
ERROR: Unsupported instruction:   %tmp360 = call i32 asm sideeffect "...", "=r,ir,*m,i,0,~{dirflag},~{fpsr},~{flags}"(i32 %tmp351, %struct.__large_struct* null, i32 -14, i32 0)
ERROR: Unsupported instruction:   %cast = addrspacecast [100 x double]* %arr to i64 addrspace(3)*

----------------------------------------
define * @test1(* %I) {
%0:
  %A = gep * %I, 4 x i64 0
  ret * %A
}
=>
define * @test1(* %I) {
%0:
  ret * %I
}
Transformation seems to be correct!


----------------------------------------
define * @test2(* %I) {
%0:
  %A = gep * %I
  ret * %A
}
=>
define * @test2(* %I) {
%0:
  ret * %I
}
Transformation seems to be correct!


----------------------------------------
define * @test3(* %I) {
%0:
  %A = gep * %I, 4 x i64 17
  %B = gep * %A, 4 x i64 4
  ret * %B
}
=>
define * @test3(* %I) {
%0:
  %B = gep * %I, 4 x i64 21
  ret * %B
}
Transformation seems to be correct!


----------------------------------------
define * @test4(* %I) {
%0:
  %A = gep * %I, 4 x i64 1
  %B = gep * %A, 4 x i64 0, 1 x i64 0
  ret * %B
}
=>
define * @test4(* %I) {
%0:
  %B = gep * %I, 4 x i64 1, 1 x i64 0
  ret * %B
}
Transformation seems to be correct!


----------------------------------------
@Global = global 10 bytes, align 1

define void @test5(i8 %B) {
%0:
  %A = gep * @Global, 10 x i64 0, 1 x i64 4
  store i8 %B, * %A, align 1
  ret void
}
=>
@Global = global 10 bytes, align 1

define void @test5(i8 %B) {
%0:
  %__constexpr_0 = gep inbounds * @Global, 10 x i64 0, 1 x i64 4
  store i8 %B, * %__constexpr_0, align 1
  ret void
}
Transformation seems to be correct!

ERROR: Unsupported instruction:   store i8 %B, i8 addrspace(1)* getelementptr inbounds ([10 x i8], [10 x i8] addrspace(1)* @Global_as1, i16 0, i16 4), align 1

----------------------------------------
define * @test7(* %I, i64 %C, i64 %D) {
%0:
  %A = gep * %I, 4 x i64 %C
  %B = gep * %A, 4 x i64 %D
  ret * %B
}
=>
define * @test7(* %I, i64 %C, i64 %D) {
%0:
  %A = gep * %I, 4 x i64 %C
  %B = gep * %A, 4 x i64 %D
  ret * %B
}
Transformation seems to be correct! (syntactically equal)


----------------------------------------
define * @test8(* %X) {
%0:
  %A = gep * %X, 40 x i64 0, 4 x i64 0
  %B = bitcast * %A to *
  ret * %B
}
=>
define * @test8(* %X) {
%0:
  %B = bitcast * %X to *
  ret * %B
}
Transformation seems to be correct!


----------------------------------------
define i32 @test9() {
%0:
  %A = gep * null, 16 x i32 0, 1 x i64 8
  %B = ptrtoint * %A to i32
  ret i32 %B
}
=>
define i32 @test9() {
%0:
  ret i32 8
}
Transformation seems to be correct!


----------------------------------------
define i1 @test10(* %x, * %y) {
%0:
  %tmp.1 = gep * %x, 8 x i32 0, 1 x i64 4
  %tmp.3 = gep * %y, 8 x i32 0, 1 x i64 4
  %tmp.4 = icmp eq * %tmp.1, %tmp.3
  ret i1 %tmp.4
}
=>
define i1 @test10(* %x, * %y) {
%0:
  %tmp.4 = icmp eq * %x, %y
  ret i1 %tmp.4
}
Transformation doesn't verify!
ERROR: Target's return value is more undefined

Example:
* %x = pointer(non-local, block_id=1, offset=102)
* %y = undef

Source:
* %tmp.1 = pointer(non-local, block_id=1, offset=106)
* %tmp.3 = pointer(non-local, block_id=0, offset=4)	[based on undef value]
i1 %tmp.4 = #x0 (0)

SOURCE MEMORY STATE
===================
NON-LOCAL BLOCKS:
Block 0 >	size: 0	align: 1	alloc type: 0	address: 0
Block 1 >	size: 130	align: 8589934592	alloc type: 0	address: 22
Block 2 >	size: 0	align: 16	alloc type: 0	address: 2

Target:
i1 %tmp.4 = #x1 (1)
Source value: #x0 (0)
Target value: #x1 (1)


------------------- SMT STATS -------------------
Num queries: 21
Num invalid: 0
Num skips:   0
Num trivial: 42 (66.7%)
Num timeout: 0 (0.0%)
Num errors:  0 (0.0%)
Num SAT:     10 (47.6%)
Num UNSAT:   11 (52.4%)
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/getelementptr.ll

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

 

<-- Back