blob: 47856f2fcb548d4bea181b27bd4dbe8552816bca [file] [log] [blame]
Krzysztof Parzyszek6bfc6572018-10-19 17:31:11 +00001; RUN: llc -march=hexagon < %s | FileCheck %s
Sirish Pandef8e5e3c2012-05-03 21:52:53 +00002; Check that we generate integer multiply accumulate.
3
Krzysztof Parzyszek952d9512015-04-22 21:17:00 +00004; CHECK: r{{[0-9]+}} {{\+|\-}}= mpyi(r{{[0-9]+}},
Sirish Pandef8e5e3c2012-05-03 21:52:53 +00005
Krzysztof Parzyszek6bfc6572018-10-19 17:31:11 +00006define i32 @f0(i32* %a0, i32* %a1) #0 {
7b0:
8 %v0 = load i32, i32* %a0, align 4
9 %v1 = udiv i32 %v0, 10000
10 %v2 = urem i32 %v1, 10
11 store i32 %v2, i32* %a1, align 4
Sirish Pandef8e5e3c2012-05-03 21:52:53 +000012 ret i32 0
13}
14
Krzysztof Parzyszek6bfc6572018-10-19 17:31:11 +000015attributes #0 = { nounwind "target-cpu"="hexagonv5" }