2018-10-19 19:31:11 +02:00
|
|
|
; RUN: llc -march=hexagon < %s | FileCheck %s
|
2012-05-03 23:52:53 +02:00
|
|
|
; Check that we generate integer multiply accumulate.
|
|
|
|
|
2015-04-22 23:17:00 +02:00
|
|
|
; CHECK: r{{[0-9]+}} {{\+|\-}}= mpyi(r{{[0-9]+}},
|
2012-05-03 23:52:53 +02:00
|
|
|
|
2018-10-19 19:31:11 +02:00
|
|
|
define i32 @f0(i32* %a0, i32* %a1) #0 {
|
|
|
|
b0:
|
|
|
|
%v0 = load i32, i32* %a0, align 4
|
|
|
|
%v1 = udiv i32 %v0, 10000
|
|
|
|
%v2 = urem i32 %v1, 10
|
|
|
|
store i32 %v2, i32* %a1, align 4
|
2012-05-03 23:52:53 +02:00
|
|
|
ret i32 0
|
|
|
|
}
|
|
|
|
|
2018-10-19 19:31:11 +02:00
|
|
|
attributes #0 = { nounwind "target-cpu"="hexagonv5" }
|