1 ; RUN: llc -march=hexagon < %s | FileCheck %s
3 @num = external global i32
4 @acc = external global i32
5 @val = external global i32
7 ; CHECK-DAG: memw(gp+#num)
8 ; CHECK-DAG: memw(gp+#acc)
9 ; CHECK-DAG: memw(gp+#val)
11 define void @foo() nounwind {
13 %0 = load i32, i32* @num, align 4
14 %1 = load i32, i32* @acc, align 4
15 %mul = mul nsw i32 %0, %1
16 %2 = load i32, i32* @val, align 4
17 %add = add nsw i32 %mul, %2
18 store i32 %add, i32* @num, align 4