Test Failure: Transforms/InstCombine/pr24354.ll

Test source: git

Log:

Source: <stdin>

----------------------------------------
@c = global 4 bytes, align 4
@b = global 4 bytes, align 4
@a = global 2 bytes, align 2
@d = global 4 bytes, align 4

define void @fn3() {
%bb:
  %tmp = load i32, * @c, align 4
  %tmp1 = icmp eq i32 %tmp, 0
  br i1 %tmp1, label %bb2, label %bb6

%bb2:
  %tmp3 = load i32, * @b, align 4
  %tmp.i = add nsw i32 255, %tmp3
  %tmp5 = icmp ugt i32 %tmp.i, 254
  br label %bb6

%bb6:
  %tmp7 = phi i1 [ 1, %bb ], [ %tmp5, %bb2 ]
  %tmp8 = zext i1 %tmp7 to i32
  %tmp10 = icmp eq i32 %tmp8, 0
  %tmp12 = load i16, * @a, align 2
  %tmp14 = icmp ne i16 %tmp12, 0
  %tmp16 = select i1 %tmp10, i1 0, i1 %tmp14
  %tmp17 = zext i1 %tmp16 to i32
  store i32 %tmp17, * @d, align 4
  ret void
}
=>
@c = global 4 bytes, align 4
@b = global 4 bytes, align 4
@a = global 2 bytes, align 2
@d = global 4 bytes, align 4

define void @fn3() {
%bb:
  %tmp = load i32, * @c, align 4
  %tmp1 = icmp eq i32 %tmp, 0
  br i1 %tmp1, label %bb2, label %bb6

%bb2:
  %tmp3 = load i32, * @b, align 4
  %tmp5 = icmp ult i32 %tmp3, 4294967041
  br label %bb6

%bb6:
  %tmp7 = phi i1 [ 1, %bb ], [ %tmp5, %bb2 ]
  %tmp12 = load i16, * @a, align 2
  %tmp14 = icmp ne i16 %tmp12, 0
  %tmp16 = and i1 %tmp7, %tmp14
  %tmp17 = zext i1 %tmp16 to i32
  store i32 %tmp17, * @d, align 4
  ret void
}
Transformation doesn't verify!
ERROR: Mismatch in memory

Example:

Source:
i32 %tmp = #x00000000 (0)
i1 %tmp1 = #x1 (1)
i32 %tmp3 = #xffffff02 (4294967042, -254)
i32 %tmp.i = #x00000001 (1)
i1 %tmp5 = #x0 (0)
i1 %tmp7 = #x0 (0)
i32 %tmp8 = #x00000000 (0)
i1 %tmp10 = #x1 (1)
i16 %tmp12 = poison
i1 %tmp14 = poison
i1 %tmp16 = #x0 (0)
i32 %tmp17 = #x00000000 (0)

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

Target:
i32 %tmp = #x00000000 (0)
i1 %tmp1 = #x1 (1)
i32 %tmp3 = #xffffff02 (4294967042, -254)
i1 %tmp5 = #x0 (0)
i1 %tmp7 = #x0 (0)
i16 %tmp12 = poison
i1 %tmp14 = poison
i1 %tmp16 = poison
i32 %tmp17 = poison

Mismatch in pointer(non-local, block_id=3, offset=2)
Source value: #x0000
Target value: poison


------------------- SMT STATS -------------------
Num queries: 2
Num invalid: 0
Num skips:   0
Num trivial: 4 (66.7%)
Num timeout: 0 (0.0%)
Num errors:  0 (0.0%)
Num SAT:     2 (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/pr24354.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/pr24354.ll

 

<-- Back