• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: true
2; DISABLED: llc -march=hexagon -mcpu=hexagonv4 < %s | FileCheck %s
3; CHECK: += mpyi
4
5define void @foo(i32 %acc, i32 %num, i32 %num2) nounwind {
6entry:
7  %acc.addr = alloca i32, align 4
8  %num.addr = alloca i32, align 4
9  %num2.addr = alloca i32, align 4
10  store i32 %acc, i32* %acc.addr, align 4
11  store i32 %num, i32* %num.addr, align 4
12  store i32 %num2, i32* %num2.addr, align 4
13  %0 = load i32* %num.addr, align 4
14  %1 = load i32* %acc.addr, align 4
15  %mul = mul nsw i32 %0, %1
16  %2 = load i32* %num2.addr, align 4
17  %add = add nsw i32 %mul, %2
18  store i32 %add, i32* %num.addr, align 4
19  ret void
20}
21