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 nofree
  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 nofree
  %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: 1	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: 4
Num invalid: 0
Num skips:   0
Num trivial: 5 (55.6%)
Num timeout: 0 (0.0%)
Num errors:  0 (0.0%)
Num SAT:     4 (100.0%)
Num UNSAT:   0 (0.0%)
Alive2: Transform doesn't verify; aborting!

stderr:

+ : 'RUN: at line 1'
+ /home/nlopes/alive2/build/opt-alive.sh -S -simplifycfg -simplifycfg-require-and-preserve-domtree=1
+ /home/nlopes/llvm/build/bin/FileCheck /home/nlopes/llvm/llvm/test/Transforms/SimplifyCFG/speculate-call.ll

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