blob: b8727da8a7e2eb4631a2067b4acbfdf9eae27d09 [file] [log] [blame]
Krzysztof Parzyszek341cf3f2016-08-08 19:24:25 +00001; RUN: llc -march=hexagon < %s | FileCheck %s
2
3; CHECK: mpy
4; CHECK-NOT: call
5
6target triple = "hexagon"
7
8; Function Attrs: nounwind
9define i32 @fred(i64 %x, i64 %y, i64* nocapture %z) #0 {
10entry:
11 %0 = tail call { i64, i1 } @llvm.smul.with.overflow.i64(i64 %x, i64 %y)
12 %1 = extractvalue { i64, i1 } %0, 1
13 %2 = extractvalue { i64, i1 } %0, 0
14 store i64 %2, i64* %z, align 8
15 %conv = zext i1 %1 to i32
16 ret i32 %conv
17}
18
19; Function Attrs: nounwind readnone
20declare { i64, i1 } @llvm.smul.with.overflow.i64(i64, i64) #1
21
22attributes #0 = { nounwind }
23attributes #1 = { nounwind readnone }