blob: 62a66e745b395954affb043ef8ca943327e6d09a [file] [log] [blame]
Akira Hatanaka4a616192015-06-08 18:50:43 +00001; RUN: llc -march thumb %s -o - | FileCheck %s
2
3; This test checks that if-conversion pass is unconditionally added to the pass
4; pipeline and is conditionally executed based on the per-function targert-cpu
5; attribute.
6
7; CHECK: ite eq
8
9define i32 @test_ifcvt(i32 %a, i32 %b) #0 {
10 %tmp2 = icmp eq i32 %a, 0
11 br i1 %tmp2, label %cond_false, label %cond_true
12
13cond_true:
14 %tmp5 = add i32 %b, 1
15 ret i32 %tmp5
16
17cond_false:
18 %tmp7 = add i32 %b, -1
19 ret i32 %tmp7
20}
21
22attributes #0 = { "target-cpu"="cortex-a8" }