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