1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=armv7a < %s | FileCheck %s --check-prefix=ARM
3 ; RUN: llc -mtriple=armv6m < %s | FileCheck %s --check-prefix=THUMB
4 ; RUN: llc -mtriple=armv7m < %s | FileCheck %s --check-prefix=THUMB2
6 define void @bool_eq(i1 zeroext %a, i1 zeroext %b, ptr nocapture %c) nounwind {
8 ; ARM: @ %bb.0: @ %entry
11 ; ARM-NEXT: .LBB0_1: @ %if.then
14 ; THUMB-LABEL: bool_eq:
15 ; THUMB: @ %bb.0: @ %entry
16 ; THUMB-NEXT: push {r7, lr}
17 ; THUMB-NEXT: cmp r0, r1
18 ; THUMB-NEXT: bne .LBB0_2
19 ; THUMB-NEXT: @ %bb.1: @ %if.then
21 ; THUMB-NEXT: .LBB0_2: @ %if.end
22 ; THUMB-NEXT: pop {r7, pc}
24 ; THUMB2-LABEL: bool_eq:
25 ; THUMB2: @ %bb.0: @ %entry
26 ; THUMB2-NEXT: cmp r0, r1
28 ; THUMB2-NEXT: bxne lr
29 ; THUMB2-NEXT: .LBB0_1: @ %if.then
33 br i1 %0, label %if.end, label %if.then
36 tail call void %c() #1
43 define void @bool_ne(i1 zeroext %a, i1 zeroext %b, ptr nocapture %c) nounwind {
45 ; ARM: @ %bb.0: @ %entry
46 ; ARM-NEXT: cmp r0, r1
48 ; ARM-NEXT: .LBB1_1: @ %if.then
51 ; THUMB-LABEL: bool_ne:
52 ; THUMB: @ %bb.0: @ %entry
53 ; THUMB-NEXT: push {r7, lr}
54 ; THUMB-NEXT: cmp r0, r1
55 ; THUMB-NEXT: beq .LBB1_2
56 ; THUMB-NEXT: @ %bb.1: @ %if.then
58 ; THUMB-NEXT: .LBB1_2: @ %if.end
59 ; THUMB-NEXT: pop {r7, pc}
61 ; THUMB2-LABEL: bool_ne:
62 ; THUMB2: @ %bb.0: @ %entry
63 ; THUMB2-NEXT: cmp r0, r1
65 ; THUMB2-NEXT: bxeq lr
66 ; THUMB2-NEXT: .LBB1_1: @ %if.then
70 br i1 %cmp, label %if.then, label %if.end
73 tail call void %c() #1