mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-01 05:01:59 +01:00
d971af6098
By following the single predecessors of the predecessors of the call site, we do not need to restrict the control flow. Reviewed By: junbuml, davide Differential Revision: https://reviews.llvm.org/D40729 llvm-svn: 321413
19 lines
481 B
LLVM
19 lines
481 B
LLVM
; RUN: opt < %s -callsite-splitting -S | FileCheck %s
|
|
; RUN: opt < %s -passes='function(callsite-splitting)' -S | FileCheck %s
|
|
|
|
define i32 @callee(i32*, i32, i32) {
|
|
ret i32 10
|
|
}
|
|
|
|
; CHECK-LABEL: @test_preds_equal
|
|
; CHECK-NOT: split
|
|
; CHECK: br i1 %cmp, label %Tail, label %Tail
|
|
define i32 @test_preds_equal(i32* %a, i32 %v, i32 %p) {
|
|
TBB:
|
|
%cmp = icmp eq i32* %a, null
|
|
br i1 %cmp, label %Tail, label %Tail
|
|
Tail:
|
|
%r = call i32 @callee(i32* %a, i32 %v, i32 %p)
|
|
ret i32 %r
|
|
}
|