Test Failure: Transforms/InstSimplify/phi.ll

Test source: git

Comments: LLVM PR52930

Log:

Source: <stdin>

----------------------------------------
define i1 @test1(i32 %x) {
%0:
  br i1 1, label %a, label %b

%b:
  %bb = or i32 %x, 10
  br label %c

%a:
  %aa = or i32 %x, 10
  br label %c

%c:
  %cc = phi i32 [ %bb, %b ], [ %aa, %a ]
  %d = urem i32 %cc, 2
  %e = icmp eq i32 %d, 0
  ret i1 %e
}
=>
define i1 @test1(i32 %x) {
%0:
  br i1 1, label %a, label %b

%b:
  %bb = or i32 %x, 10
  br label %c

%a:
  %aa = or i32 %x, 10
  br label %c

%c:
  %cc = phi i32 [ %bb, %b ], [ %aa, %a ]
  %d = urem i32 %cc, 2
  %e = icmp eq i32 %d, 0
  ret i1 %e
}
Transformation seems to be correct! (syntactically equal)


----------------------------------------
define i32 @lcssa-phi(i32 %x) {
%entry:
  br label %end

%end:
  %counter.lcssa = phi i32 [ %x, %entry ]
  ret i32 %counter.lcssa
}
=>
define i32 @lcssa-phi(i32 %x) {
%entry:
  br label %end

%end:
  ret i32 %x
}
Transformation seems to be correct!


----------------------------------------
define i32 @poison(i1 %cond, i32 %v) {
%0:
  br i1 %cond, label %A, label %B

%B:
  br label %EXIT

%A:
  br label %EXIT

%EXIT:
  %w = phi i32 [ %v, %A ], [ poison, %B ]
  ret i32 %w
}
=>
define i32 @poison(i1 %cond, i32 %v) {
%0:
  br i1 %cond, label %A, label %B

%B:
  br label %EXIT

%A:
  br label %EXIT

%EXIT:
  ret i32 %v
}
Transformation seems to be correct!


----------------------------------------
define i32 @undef(i1 %cond, i32 %v) {
%0:
  br i1 %cond, label %A, label %B

%B:
  br label %EXIT

%A:
  br label %EXIT

%EXIT:
  %w = phi i32 [ %v, %A ], [ undef, %B ]
  ret i32 %w
}
=>
define i32 @undef(i1 %cond, i32 %v) {
%0:
  br i1 %cond, label %A, label %B

%B:
  br label %EXIT

%A:
  br label %EXIT

%EXIT:
  ret i32 %v
}
Transformation doesn't verify!
ERROR: Target is more poisonous than source

Example:
i1 %cond = #x0 (0)
i32 %v = poison

Source:
  >> Jump to %B
  >> Jump to %EXIT
i32 %w = any

Target:
  >> Jump to %B
  >> Jump to %EXIT
Source value: any
Target value: poison


------------------- SMT STATS -------------------
Num queries: 17
Num invalid: 0
Num skips:   0
Num trivial: 12 (41.4%)
Num timeout: 0 (0.0%)
Num errors:  0 (0.0%)
Num SAT:     10 (58.8%)
Num UNSAT:   7 (41.2%)
Alive2: Transform doesn't verify; aborting!

stderr:

+ : 'RUN: at line 2'
+ /home/nuno/alive2/build/opt-alive.sh -passes=instsimplify -S
+ /home/nuno/llvm/build/bin/FileCheck /home/nuno/llvm/llvm/test/Transforms/InstSimplify/phi.ll

FileCheck error: '<stdin>' is empty.
FileCheck command line:  /home/nuno/llvm/build/bin/FileCheck /home/nuno/llvm/llvm/test/Transforms/InstSimplify/phi.ll

 

<-- Back