1 ; Ensure that shifts are lowered to loops when the barrel shifter unit is
2 ; not available in the hardware and that loops are not used when the
3 ; barrel shifter unit is available in the hardware.
5 ; RUN: llc < %s -march=mblaze | FileCheck -check-prefix=FUN %s
6 ; RUN: llc < %s -march=mblaze -mattr=+barrel | FileCheck -check-prefix=SHT %s
8 define i8 @test_i8(i8 %a, i8 %b) {
12 %tmp.1 = shl i8 %a, %b
25 define i8 @testc_i8(i8 %a, i8 %b) {
44 define i16 @test_i16(i16 %a, i16 %b) {
48 %tmp.1 = shl i16 %a, %b
61 define i16 @testc_i16(i16 %a, i16 %b) {
65 %tmp.1 = shl i16 %a, 5
80 define i32 @test_i32(i32 %a, i32 %b) {
84 %tmp.1 = shl i32 %a, %b
98 define i32 @testc_i32(i32 %a, i32 %b) {
102 %tmp.1 = shl i32 %a, 5