mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-23 19:59:57 +00:00
fa6bc2e94d
on a per-function basis. Previously some of the passes were conditionally added to ARM's pass pipeline based on the target machine's subtarget. This patch makes changes to add those passes unconditionally and execute them conditonally based on the predicate functor passed to the pass constructors. This enables running different sets of passes for different functions in the module. rdar://problem/20542263 Differential Revision: http://reviews.llvm.org/D8717 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239325 91177308-0d34-0410-b5e6-96231b3b80d8
23 lines
516 B
LLVM
23 lines
516 B
LLVM
; RUN: llc -march thumb %s -o - | FileCheck %s
|
|
|
|
; This test checks that if-conversion pass is unconditionally added to the pass
|
|
; pipeline and is conditionally executed based on the per-function targert-cpu
|
|
; attribute.
|
|
|
|
; CHECK: ite eq
|
|
|
|
define i32 @test_ifcvt(i32 %a, i32 %b) #0 {
|
|
%tmp2 = icmp eq i32 %a, 0
|
|
br i1 %tmp2, label %cond_false, label %cond_true
|
|
|
|
cond_true:
|
|
%tmp5 = add i32 %b, 1
|
|
ret i32 %tmp5
|
|
|
|
cond_false:
|
|
%tmp7 = add i32 %b, -1
|
|
ret i32 %tmp7
|
|
}
|
|
|
|
attributes #0 = { "target-cpu"="cortex-a8" }
|