1 ; Ensure that multiplication is lowered to function calls when the multiplier
2 ; unit is not available in the hardware and that function calls are not used
3 ; when the multiplier unit is available in the hardware.
5 ; RUN: llc < %s -march=mblaze | FileCheck -check-prefix=FUN %s
6 ; RUN: llc < %s -march=mblaze -mattr=+div | FileCheck -check-prefix=DIV %s
8 define i8 @test_i8(i8 %a, i8 %b) {
12 %tmp.1 = udiv i8 %a, %b
18 %tmp.2 = sdiv i8 %a, %b
25 %tmp.3 = add i8 %tmp.1, %tmp.2
31 define i16 @test_i16(i16 %a, i16 %b) {
35 %tmp.1 = udiv i16 %a, %b
41 %tmp.2 = sdiv i16 %a, %b
48 %tmp.3 = add i16 %tmp.1, %tmp.2
54 define i32 @test_i32(i32 %a, i32 %b) {
58 %tmp.1 = udiv i32 %a, %b
64 %tmp.2 = sdiv i32 %a, %b
71 %tmp.3 = add i32 %tmp.1, %tmp.2