• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc -O0 -mhwmult=f5series < %s | FileCheck %s
2; RUN: llc -O0 -mattr=+hwmultf5 < %s | FileCheck %s
3
4target datalayout = "e-p:16:16:16-i8:8:8-i16:16:16-i32:16:32-n8:16-a0:16:16"
5target triple = "msp430---elf"
6
7@g_i32 = global i32 123, align 8
8@g_i64 = global i64 456, align 8
9@g_i16 = global i16 789, align 8
10
11define i16 @mpyi() #0 {
12entry:
13; CHECK: mpyi:
14
15; CHECK: call #__mspabi_mpyi_f5hw
16  %0 = load volatile i16, i16* @g_i16, align 8
17  %1 = mul i16 %0, %0
18
19  ret i16 %1
20}
21
22define i32 @mpyli() #0 {
23entry:
24; CHECK: mpyli:
25
26; CHECK: call #__mspabi_mpyl_f5hw
27  %0 = load volatile i32, i32* @g_i32, align 8
28  %1 = mul i32 %0, %0
29
30  ret i32 %1
31}
32
33define i64 @mpylli() #0 {
34entry:
35; CHECK: mpylli:
36
37; CHECK: call #__mspabi_mpyll_f5hw
38  %0 = load volatile i64, i64* @g_i64, align 8
39  %1 = mul i64 %0, %0
40
41  ret i64 %1
42}
43
44attributes #0 = { nounwind }
45