Test Failure: Transforms/SimpleLoopUnswitch/LIV-loop-condtion.ll

Test source: git

Log:

Source: <stdin>

----------------------------------------
define i32 @test(i1 %cond1, i32 %var1) {
%entry:
  br label %loop_begin

%loop_begin:
  %var3 = phi i32 [ %var1, %entry ], [ %var2, %do_something ]
  %cond2 = icmp eq i32 %var3, 10
  %cond.and = and i1 %cond1, %cond2
  br i1 %cond.and, label %do_something, label %loop_exit

%do_something:
  %var2 = add i32 %var3, 1
  call void @some_func() noreturn
  br label %loop_begin

%loop_exit:
  ret i32 0
}
=>
define i32 @test(i1 %cond1, i32 %var1) {
%entry:
  br i1 %cond1, label %entry.split, label %loop_exit.split

%entry.split:
  br label %loop_begin

%loop_begin:
  %var3 = phi i32 [ %var1, %entry.split ], [ %var2, %do_something ]
  %cond2 = icmp eq i32 %var3, 10
  %cond.and = and i1 1, %cond2
  br i1 %cond.and, label %do_something, label %loop_exit

%do_something:
  %var2 = add i32 %var3, 1
  call void @some_func() noreturn
  br label %loop_begin

%loop_exit:
  br label %loop_exit.split

%loop_exit.split:
  ret i32 0
}
Transformation doesn't verify!
ERROR: Source is more defined than target

Example:
i1 %cond1 = undef
i32 %var1 = #xfffffff5 (4294967285, -11)

Source:
i32 %var3 = #xfffffff5 (4294967285, -11)
i1 %cond2 = #x0 (0)
i1 %cond.and = #x0 (0)
i32 %var2 = #xfffffff6 (4294967286, -10)

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

Target:
i32 %var3 = #xfffffff5 (4294967285, -11)
i1 %cond2 = #x0 (0)
i1 %cond.and = #x0 (0)
i32 %var2 = #xfffffff6 (4294967286, -10)



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

stderr:

+ : 'RUN: at line 1'
+ /home/nlopes/llvm/build/bin/FileCheck /home/nlopes/llvm/llvm/test/Transforms/SimpleLoopUnswitch/LIV-loop-condtion.ll
+ /home/nlopes/alive2/build/opt-alive.sh -simple-loop-unswitch -S
/home/nlopes/llvm/llvm/test/Transforms/SimpleLoopUnswitch/LIV-loop-condtion.ll:8:16: error: CHECK-LABEL: expected string not found in input
; CHECK-LABEL: define i32 @test(
               ^
<stdin>:1:1: note: scanning from here

^
<stdin>:1:53: note: possible intended match here

                                                    ^

Input file: <stdin>
Check file: /home/nlopes/llvm/llvm/test/Transforms/SimpleLoopUnswitch/LIV-loop-condtion.ll

-dump-input=help explains the following input dump.

Input was:
<<<<<<
           1:  
label:8'0     X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
label:8'1                                                         ?             possible intended match
>>>>>>

 

NOTE: This test would pass if undef didn't exist!

 

<-- Back