Home | History | Annotate | Download | only in MSP430
      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"
      4 
      5 define zeroext i8 @lshr8(i8 zeroext %a, i8 zeroext %cnt) nounwind readnone {
      6 entry:
      7 ; CHECK-LABEL: lshr8:
      8 ; CHECK: rrc.b
      9   %shr = lshr i8 %a, %cnt
     10   ret i8 %shr
     11 }
     12 
     13 define signext i8 @ashr8(i8 signext %a, i8 zeroext %cnt) nounwind readnone {
     14 entry:
     15 ; CHECK-LABEL: ashr8:
     16 ; CHECK: rra.b
     17   %shr = ashr i8 %a, %cnt
     18   ret i8 %shr
     19 }
     20 
     21 define zeroext i8 @shl8(i8 zeroext %a, i8 zeroext %cnt) nounwind readnone {
     22 entry:
     23 ; CHECK: shl8
     24 ; CHECK: rla.b
     25   %shl = shl i8 %a, %cnt
     26   ret i8 %shl
     27 }
     28 
     29 define zeroext i16 @lshr16(i16 zeroext %a, i16 zeroext %cnt) nounwind readnone {
     30 entry:
     31 ; CHECK-LABEL: lshr16:
     32 ; CHECK: rrc.w
     33   %shr = lshr i16 %a, %cnt
     34   ret i16 %shr
     35 }
     36 
     37 define signext i16 @ashr16(i16 signext %a, i16 zeroext %cnt) nounwind readnone {
     38 entry:
     39 ; CHECK-LABEL: ashr16:
     40 ; CHECK: rra.w
     41   %shr = ashr i16 %a, %cnt
     42   ret i16 %shr
     43 }
     44 
     45 define zeroext i16 @shl16(i16 zeroext %a, i16 zeroext %cnt) nounwind readnone {
     46 entry:
     47 ; CHECK-LABEL: shl16:
     48 ; CHECK: rla.w
     49   %shl = shl i16 %a, %cnt
     50   ret i16 %shl
     51 }
     52