1 ; RUN: llc < %s -mtriple=arm-apple-darwin | FileCheck %s
3 ; PR30660 - https://llvm.org/bugs/show_bug.cgi?id=30660
5 define i32 @select_i32_neg1_or_0(i1 %a) {
6 ; CHECK-LABEL: select_i32_neg1_or_0:
8 ; CHECK-NEXT: and r0, r0, #1
9 ; CHECK-NEXT: rsb r0, r0, #0
10 ; CHECK-NEXT: mov pc, lr
12 %b = sext i1 %a to i32
16 define i32 @select_i32_neg1_or_0_zeroext(i1 zeroext %a) {
17 ; CHECK-LABEL: select_i32_neg1_or_0_zeroext:
18 ; CHECK-NEXT: @ %bb.0:
19 ; CHECK-NEXT: rsb r0, r0, #0
20 ; CHECK-NEXT: mov pc, lr
22 %b = sext i1 %a to i32