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
26 define i8 @testc_i8(i8 %a, i8 %b) {
45 define i16 @test_i16(i16 %a, i16 %b) {
49 %tmp.1 = shl i16 %a, %b
63 define i16 @testc_i16(i16 %a, i16 %b) {
67 %tmp.1 = shl i16 %a, 5
82 define i32 @test_i32(i32 %a, i32 %b) {
86 %tmp.1 = shl i32 %a, %b
100 define i32 @testc_i32(i32 %a, i32 %b) {
104 %tmp.1 = shl i32 %a, 5