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 5 6define void @bool_eq(i1 zeroext %a, i1 zeroext %b, void ()* nocapture %c) nounwind { 7; ARM-LABEL: bool_eq: 8; ARM: @ %bb.0: @ %entry 9; ARM-NEXT: cmp r0, r1 10; ARM-NEXT: bxne lr 11; ARM-NEXT: .LBB0_1: @ %if.then 12; ARM-NEXT: bx r2 13; 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 20; THUMB-NEXT: blx r2 21; THUMB-NEXT: .LBB0_2: @ %if.end 22; THUMB-NEXT: pop {r7, pc} 23; 24; THUMB2-LABEL: bool_eq: 25; THUMB2: @ %bb.0: @ %entry 26; THUMB2-NEXT: cmp r0, r1 27; THUMB2-NEXT: it ne 28; THUMB2-NEXT: bxne lr 29; THUMB2-NEXT: .LBB0_1: @ %if.then 30; THUMB2-NEXT: bx r2 31entry: 32 %0 = xor i1 %a, %b 33 br i1 %0, label %if.end, label %if.then 34 35if.then: 36 tail call void %c() #1 37 br label %if.end 38 39if.end: 40 ret void 41} 42 43define void @bool_ne(i1 zeroext %a, i1 zeroext %b, void ()* nocapture %c) nounwind { 44; ARM-LABEL: bool_ne: 45; ARM: @ %bb.0: @ %entry 46; ARM-NEXT: cmp r0, r1 47; ARM-NEXT: bxeq lr 48; ARM-NEXT: .LBB1_1: @ %if.then 49; ARM-NEXT: bx r2 50; 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 57; THUMB-NEXT: blx r2 58; THUMB-NEXT: .LBB1_2: @ %if.end 59; THUMB-NEXT: pop {r7, pc} 60; 61; THUMB2-LABEL: bool_ne: 62; THUMB2: @ %bb.0: @ %entry 63; THUMB2-NEXT: cmp r0, r1 64; THUMB2-NEXT: it eq 65; THUMB2-NEXT: bxeq lr 66; THUMB2-NEXT: .LBB1_1: @ %if.then 67; THUMB2-NEXT: bx r2 68entry: 69 %cmp = xor i1 %a, %b 70 br i1 %cmp, label %if.then, label %if.end 71 72if.then: 73 tail call void %c() #1 74 br label %if.end 75 76if.end: 77 ret void 78} 79