Test Failure: Transforms/SimpleLoopUnswitch/trivial-unswitch-logical-and-or.ll

Test source: git

Log:

Source: /home/nuno/llvm/llvm/test/Transforms/SimpleLoopUnswitch/trivial-unswitch-logical-and-or.ll

----------------------------------------
define void @test_select_logical_and_or_with_and_1(i1 noundef %cond1, i1 noundef %cond2) {
%entry:
  br label %loop.header

%loop.header:
  %cond_and1 = and i1 noundef %cond2, noundef %cond1
  %sel = select i1 %cond_and1, i1 1, i1 0
  br i1 %sel, label %exit, label %loop.latch

%exit:
  ret void

%loop.latch:
  call void @some_func()
  br label %loop.header
}
=>
define void @test_select_logical_and_or_with_and_1(i1 noundef %cond1, i1 noundef %cond2) {
%entry:
  %0 = or i1 noundef %cond2, noundef %cond1
  br i1 %0, label %exit.split, label %entry.split

%entry.split:
  br label %loop.header

%loop.header:
  %cond_and1 = and i1 0, 0
  %sel = select i1 %cond_and1, i1 1, i1 0
  br i1 %sel, label %exit, label %loop.latch

%exit:
  br label %exit.split

%loop.latch:
  call void @some_func()
  br label %loop.header

%exit.split:
  ret void
}
Transformation doesn't verify!
ERROR: Source and target don't have the same return domain

Example:
i1 noundef %cond1 = #x0 (0)
i1 noundef %cond2 = #x1 (1)

Source:
  >> Jump to %loop.header
i1 %cond_and1 = #x0 (0)
i1 %sel = #x0 (0)
  >> Jump to %loop.latch
void = UB triggered!

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

Target:
i1 %0 = #x1 (1)
  >> Jump to %exit.split



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

stderr:

+ : 'RUN: at line 2'
+ /home/nuno/alive2/build/opt-alive.sh '-passes=loop-mssa(simple-loop-unswitch)' -S /home/nuno/llvm/llvm/test/Transforms/SimpleLoopUnswitch/trivial-unswitch-logical-and-or.ll
+ /home/nuno/llvm/build/bin/FileCheck /home/nuno/llvm/llvm/test/Transforms/SimpleLoopUnswitch/trivial-unswitch-logical-and-or.ll

FileCheck error: '<stdin>' is empty.
FileCheck command line:  /home/nuno/llvm/build/bin/FileCheck /home/nuno/llvm/llvm/test/Transforms/SimpleLoopUnswitch/trivial-unswitch-logical-and-or.ll

 

<-- Back