Test Failure: Transforms/SimplifyCFG/implied-cond-matching.ll

Test source: git

Log:

Source: /home/nlopes/llvm/llvm/test/Transforms/SimplifyCFG/implied-cond-matching.ll

----------------------------------------
define void @test_swapped_ops(i32 %a, i32 %b) {
%entry:
  %cmp = icmp ugt i32 %a, %b
  br i1 %cmp, label %if.then, label %if.end3

%if.then:
  %cmp1 = icmp ugt i32 %b, %a
  br i1 %cmp1, label %if.then2, label %if.end

%if.then2:
  call void @dead()
  br label %if.end

%if.end:
  call void @alive()
  br label %if.end3

%if.end3:
  ret void
}
=>
define void @test_swapped_ops(i32 %a, i32 %b) {
%entry:
  %cmp = icmp ugt i32 %a, %b
  br i1 %cmp, label %if.end, label %if.end3

%if.end:
  call void @alive()
  br label %if.end3

%if.end3:
  ret void
}
Transformation seems to be correct!


----------------------------------------
define void @test_swapped_pred(i32 %a, i32 %b) {
%entry:
  %cmp = icmp ugt i32 %a, %b
  br i1 %cmp, label %if.then, label %if.end3

%if.then:
  call void @alive()
  %cmp1 = icmp ult i32 %b, %a
  br i1 %cmp1, label %if.then2, label %if.end3

%if.then2:
  call void @alive()
  br label %if.end3

%if.end3:
  ret void
}
=>
define void @test_swapped_pred(i32 %a, i32 %b) {
%entry:
  %cmp = icmp ugt i32 %a, %b
  br i1 %cmp, label %if.then, label %if.end3

%if.then:
  call void @alive()
  call void @alive()
  br label %if.end3

%if.end3:
  ret void
}
Transformation seems to be correct!


----------------------------------------
define void @test_eq_eq(i32 %a, i32 %b) {
%0:
  %cmp1 = icmp eq i32 %a, %b
  br i1 %cmp1, label %taken, label %untaken

%untaken:
  ret void

%taken:
  %cmp2 = icmp eq i32 %a, %b
  br i1 %cmp2, label %eq_eq_istrue, label %eq_eq_isfalse

%eq_eq_istrue:
  call void @is(i1 1)
  ret void

%eq_eq_isfalse:
  call void @is(i1 0)
  ret void
}
=>
define void @test_eq_eq(i32 %a, i32 %b) {
%0:
  %cmp1 = icmp eq i32 %a, %b
  br i1 %cmp1, label %eq_eq_istrue, label %untaken

%untaken:
  ret void

%eq_eq_istrue:
  call void @is(i1 1)
  ret void
}
Transformation doesn't verify!
ERROR: Source is more defined than target

Example:
i32 %a = #x00080000 (524288)
i32 %b = undef

Source:
i1 %cmp1 = any
i1 %cmp2 = any

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

Target:
i1 %cmp1 = any



------------------- SMT STATS -------------------
Num queries: 11
Num invalid: 0
Num skips:   0
Num trivial: 6 (35.3%)
Num timeout: 0 (0.0%)
Num errors:  0 (0.0%)
Num SAT:     4 (36.4%)
Num UNSAT:   7 (63.6%)

stderr:

+ : 'RUN: at line 1'
+ /home/nlopes/alive2/scripts/opt-alive.sh /home/nlopes/llvm/llvm/test/Transforms/SimplifyCFG/implied-cond-matching.ll -S -simplifycfg
+ /home/nlopes/llvm/build/bin/FileCheck /home/nlopes/llvm/llvm/test/Transforms/SimplifyCFG/implied-cond-matching.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/SimplifyCFG/implied-cond-matching.ll

 

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

 

<-- Back