1 ; RUN: llc < %s | FileCheck %s
2 target datalayout = "e-p:16:8:8-i8:8:8-i16:8:8-i32:8:8-n8:16"
3 target triple = "msp430-elf"
5 define zeroext i8 @lshr8(i8 zeroext %a, i8 zeroext %cnt) nounwind readnone {
10 %shr = lshr i8 %a, %cnt
14 define signext i8 @ashr8(i8 signext %a, i8 zeroext %cnt) nounwind readnone {
18 %shr = ashr i8 %a, %cnt
22 define zeroext i8 @shl8(i8 zeroext %a, i8 zeroext %cnt) nounwind readnone {
26 %shl = shl i8 %a, %cnt
30 define zeroext i16 @lshr16(i16 zeroext %a, i16 zeroext %cnt) nounwind readnone {
32 ; CHECK-LABEL: lshr16:
35 %shr = lshr i16 %a, %cnt
39 define signext i16 @ashr16(i16 signext %a, i16 zeroext %cnt) nounwind readnone {
41 ; CHECK-LABEL: ashr16:
43 %shr = ashr i16 %a, %cnt
47 define zeroext i16 @shl16(i16 zeroext %a, i16 zeroext %cnt) nounwind readnone {
51 %shl = shl i16 %a, %cnt
55 define i16 @ashr10_i16(i16 %a) #0 {
57 ; CHECK-LABEL: ashr10_i16:
62 %shr = ashr i16 %a, 10
66 define i16 @lshr10_i16(i16 %a) #0 {
68 ; CHECK-LABEL: lshr10_i16:
70 ; CHECK-NEXT: mov.b r12, r12
74 %shr = lshr i16 %a, 10
78 define i16 @lshl10_i16(i16 %a) #0 {
80 ; CHECK-LABEL: lshl10_i16:
81 ; CHECK: mov.b r12, r12
82 ; CHECK-NEXT: swpb r12
83 ; CHECK-NEXT: add r12, r12
84 ; CHECK-NEXT: add r12, r12