1 ; RUN: llc -mtriple=thumbv7-unknown-linux %s -o - | FileCheck %s 2 3 declare void @x() 4 5 define void @f0(i32 %x) optsize { 6 ; CHECK-LABEL: f0: 7 ; CHECK: cbnz 8 %p = icmp eq i32 %x, 0 9 br i1 %p, label %t, label %f 10 11 t: 12 call void @x() 13 br label %f 14 15 f: 16 ret void 17 } 18 19 define void @f1(i32 %x) optsize { 20 ; CHECK-LABEL: f1: 21 ; CHECK: cmp r0, #1 22 ; CHECK: it ne 23 ; CHECK-NEXT: bxne lr 24 %p = icmp eq i32 %x, 1 25 br i1 %p, label %t, label %f 26 27 t: 28 call void @x() 29 br label %f 30 31 f: 32 ret void 33 } 34 35 define void @f2(i32 %x) { 36 ; CHECK-LABEL: f2: 37 ; CHECK: cmp r0, #0 38 ; CHECK: it ne 39 ; CHECK-NEXT: bxne lr 40 %p = icmp eq i32 %x, 0 41 br i1 %p, label %t, label %f 42 43 t: 44 call void @x() 45 br label %f 46 47 f: 48 ret void 49 } 50