Test Failure: Transforms/InstCombine/bitcast-phi-uselistorder.ll

Test source: git

Log:

Source: <stdin>

----------------------------------------
@Q = global 8 bytes, align 8

define double @test(i1 %c, * %p) {
%entry:
  br i1 %c, label %if, label %end

%if:
  %__constexpr_0 = bitcast * @Q to *
  %load = load i64, * %__constexpr_0, align 8
  br label %end

%end:
  %phi = phi i64 [ 0, %entry ], [ %load, %if ]
  store i64 %phi, * %p, align 8
  %cast = bitcast i64 %phi to double
  ret double %cast
}
=>
@Q = global 8 bytes, align 8

define double @test(i1 %c, * %p) {
%entry:
  br i1 %c, label %if, label %end

%if:
  %load1 = load double, * @Q, align 8
  br label %end

%end:
  %0 = phi double [ 0.000000, %entry ], [ %load1, %if ]
  %1 = bitcast * %p to *
  store double %0, * %1, align 8
  ret double %0
}
Transformation doesn't verify!
ERROR: Mismatch in memory

Example:
i1 %c = #x1 (1)
* %p = pointer(non-local, block_id=1, offset=0)

Source:
* %__constexpr_0 = pointer(non-local, block_id=1, offset=0)
i64 %load = #x7ff0200000000000 (9218903621599494144)
i64 %phi = #x7ff0200000000000 (9218903621599494144)
double %cast = NaN

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

Target:
double %load1 = NaN
double %0 = NaN
* %1 = pointer(non-local, block_id=1, offset=0)

Mismatch in pointer(non-local, block_id=1, offset=0)
Source value: #x7ff0200000000000
Target value: #x7ff0000000001000


------------------- SMT STATS -------------------
Num queries: 4
Num invalid: 0
Num skips:   0
Num trivial: 12 (75.0%)
Num timeout: 0 (0.0%)
Num errors:  0 (0.0%)
Num SAT:     2 (50.0%)
Num UNSAT:   2 (50.0%)
Alive2: Transform doesn't verify; aborting!

stderr:

+ : 'RUN: at line 2'
+ /home/nlopes/alive2/build/opt-alive.sh -S -instcombine
+ /home/nlopes/llvm/build/bin/FileCheck /home/nlopes/llvm/llvm/test/Transforms/InstCombine/bitcast-phi-uselistorder.ll

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

 

<-- Back