Test Failure: Transforms/InstCombine/load-bitcast32.ll

Test source: git

Log:

Source: <stdin>

----------------------------------------
define * @test1(* %x) {
%entry:
  %a = bitcast * %x to *
  %b = load i64, * %a, align 4
  %c = int2ptr i64 %b to *
  ret * %c
}
=>
define * @test1(* %x) {
%entry:
  %a = bitcast * %x to *
  %b = load i64, * %a, align 4
  %0 = trunc i64 %b to i32
  %c = int2ptr i32 %0 to *
  ret * %c
}
Transformation doesn't verify!
ERROR: Invalid expr


----------------------------------------
define * @test2(* %x) {
%entry:
  %a = bitcast * %x to *
  %b = load i32, * %a, align 4
  %c = int2ptr i32 %b to *
  ret * %c
}
=>
define * @test2(* %x) {
%entry:
  %0 = bitcast * %x to *
  %b1 = load *, * %0, align 4
  ret * %b1
}
Transformation doesn't verify!
ERROR: Target is more poisonous than source

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

Source:
* %a = pointer(non-local, block_id=2, offset=1)
i32 %b = #x00000001 (1)
* %c = (invalid expr)

SOURCE MEMORY STATE
===================
NON-LOCAL BLOCKS:
Block 0 >	size: 0	align: 32	alloc type: 0	address: 0
Block 1 >	size: 131946495	align: 2	alloc type: 0	address: 603979778
Block 2 >	size: 536870912	align: 2	alloc type: 0	address: 3
Block 3 >	size: 1073741823	align: 2	alloc type: 0	address: 1073741824

Target:
* %0 = pointer(non-local, block_id=2, offset=1)
* %b1 = poison
Source value: (invalid expr)
Target value: poison


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

stderr:

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

 

<-- Back