1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=msp430-- < %s | FileCheck %s
4 define i16 @select_to_shifts_i16(i16 %a, i16 %b) {
5 ; CHECK-LABEL: select_to_shifts_i16:
7 ; CHECK-NEXT: mov r12, r14
9 ; CHECK-NEXT: bit #2, r14
10 ; CHECK-NEXT: jeq .LBB0_2
11 ; CHECK-NEXT: ; %bb.1:
12 ; CHECK-NEXT: mov r13, r12
13 ; CHECK-NEXT: .LBB0_2:
16 %tobool = icmp eq i16 %and, 0
17 %select = select i1 %tobool, i16 0, i16 %b
21 define i32 @select_to_shifts_i32(i32 %a, i32 %b) {
22 ; CHECK-LABEL: select_to_shifts_i32:
24 ; CHECK-NEXT: mov r12, r11
25 ; CHECK-NEXT: and #2, r11
29 ; CHECK-NEXT: jne .LBB1_3
30 ; CHECK-NEXT: ; %bb.1:
32 ; CHECK-NEXT: jne .LBB1_4
33 ; CHECK-NEXT: .LBB1_2:
35 ; CHECK-NEXT: .LBB1_3:
36 ; CHECK-NEXT: mov r14, r12
38 ; CHECK-NEXT: jeq .LBB1_2
39 ; CHECK-NEXT: .LBB1_4:
40 ; CHECK-NEXT: mov r15, r13
43 %tobool = icmp eq i32 %and, 0
44 %select = select i1 %tobool, i32 0, i32 %b