• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; 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" }
23