Test Failure: Transforms/InstCombine/cast_ptr.ll

Test source: git

Log:

Source: <stdin>

----------------------------------------
define * @test1(* %t) {
%0:
  %tmpc = ptrtoint * %t to i32
  %tmpa = add i32 %tmpc, 32
  %tv = int2ptr i32 %tmpa to *
  ret * %tv
}
=>
define * @test1(* %t) {
%0:
  %tmpc = ptrtoint * %t to i32
  %tmpa = add i32 %tmpc, 32
  %tv = int2ptr i32 %tmpa to *
  ret * %tv
}
Transformation doesn't verify!
ERROR: Invalid expr


----------------------------------------
define i1 @test2(* %a, * %b) {
%0:
  %tmpa = ptrtoint * %a to i32
  %tmpb = ptrtoint * %b to i32
  %r = icmp eq i32 %tmpa, %tmpb
  ret i1 %r
}
=>
define i1 @test2(* %a, * %b) {
%0:
  %r = icmp eq * %a, %b
  ret i1 %r
}
Transformation doesn't verify!
ERROR: Value mismatch

Example:
* %a = pointer(non-local, block_id=1, offset=0)
* %b = pointer(non-local, block_id=0, offset=524288)

Source:
i32 %tmpa = #x00080000 (524288)
i32 %tmpb = #x00080000 (524288)
i1 %r = #x1 (1)

SOURCE MEMORY STATE
===================
NON-LOCAL BLOCKS:
Block 0 >	size: 0	align: 32	alloc type: 0	address: 0
Block 1 >	size: 166734824	align: 2	alloc type: 0	address: 524288
Block 2 >	size: 770	align: 2	alloc type: 0	address: 1

Target:
i1 %r = #x0 (0)
Source value: #x1 (1)
Target value: #x0 (0)


------------------- SMT STATS -------------------
Num queries: 3
Num invalid: 1
Num skips:   0
Num trivial: 6 (66.7%)
Num timeout: 0 (0.0%)
Num errors:  0 (0.0%)
Num SAT:     3 (100.0%)
Num UNSAT:   0 (0.0%)

stderr:

+ : 'RUN: at line 2'
+ /home/nlopes/alive2/scripts/opt-alive.sh -instcombine -S
+ /home/nlopes/llvm/build/bin/FileCheck /home/nlopes/llvm/llvm/test/Transforms/InstCombine/cast_ptr.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/InstCombine/cast_ptr.ll

 

<-- Back