Krzysztof Parzyszek | 341cf3f | 2016-08-08 19:24:25 +0000 | [diff] [blame] | 1 | ; RUN: llc -march=hexagon < %s | FileCheck %s |
| 2 | |
| 3 | ; CHECK: mpy |
| 4 | ; CHECK-NOT: call |
| 5 | |
| 6 | target triple = "hexagon" |
| 7 | |
| 8 | ; Function Attrs: nounwind |
| 9 | define i32 @fred(i64 %x, i64 %y, i64* nocapture %z) #0 { |
| 10 | entry: |
| 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 |
| 20 | declare { i64, i1 } @llvm.smul.with.overflow.i64(i64, i64) #1 |
| 21 | |
| 22 | attributes #0 = { nounwind } |
| 23 | attributes #1 = { nounwind readnone } |