Test Failure: Transforms/SimplifyCFG/speculate-call.ll

Test source: git

Comments: Alive2 missing support for speculatable attribute

Log:

Source: <stdin>

----------------------------------------
define i32 @speculatable_attribute(i32 %a) {
%entry:
  %c = icmp sgt i32 %a, 64
  br i1 %c, label %end, label %if

%if:
  %val = call i32 @func() noread nowrite
  br label %end

%end:
  %ret = phi i32 [ %val, %if ], [ 0, %entry ]
  ret i32 %ret
}
=>
define i32 @speculatable_attribute(i32 %a) {
%entry:
  %c = icmp sgt i32 %a, 64
  %val = call i32 @func() noread nowrite
  %spec.select = select i1 %c, i32 0, i32 %val
  ret i32 %spec.select
}
Transformation doesn't verify!
ERROR: Source is more defined than target

Example:
i32 %a = #x00000041 (65)

Source:
i1 %c = #x1 (1)
i32 %val = poison
i32 %ret = #x00000000 (0)

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

Target:
i1 %c = #x1 (1)
i32 %val = poison
i32 %spec.select = #x00000000 (0)



------------------- SMT STATS -------------------
Num queries: 2
Num invalid: 0
Num skips:   0
Num trivial: 0 (0.0%)
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 -S -simplifycfg
+ /home/nlopes/llvm/build/bin/FileCheck /home/nlopes/llvm/llvm/test/Transforms/SimplifyCFG/speculate-call.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/speculate-call.ll

 

<-- Back