aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/ARM/cmn.ll
blob: ef73165366ad09ac86d07d7733716c1a66684f16 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
; RUN: llc < %s -mtriple thumbv7-apple-ios | FileCheck %s
; <rdar://problem/7569620>

define i32 @compare_i_gt(i32 %a) {
entry:
; CHECK:     compare_i_gt
; CHECK-NOT: mvn
; CHECK:     cmn
  %cmp = icmp sgt i32 %a, -78
  %. = zext i1 %cmp to i32
  ret i32 %.
}

define i32 @compare_r_eq(i32 %a, i32 %b) {
entry:
; CHECK: compare_r_eq
; CHECK: cmn
  %sub = sub nsw i32 0, %b
  %cmp = icmp eq i32 %a, %sub
  %. = zext i1 %cmp to i32
  ret i32 %.
}