summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/NVPTX/imad.ll
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/CodeGen/NVPTX/imad.ll')
-rw-r--r--llvm/test/CodeGen/NVPTX/imad.ll9
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/NVPTX/imad.ll b/llvm/test/CodeGen/NVPTX/imad.ll
new file mode 100644
index 00000000000..67421c7cac4
--- /dev/null
+++ b/llvm/test/CodeGen/NVPTX/imad.ll
@@ -0,0 +1,9 @@
+; RUN: llc < %s -march=nvptx -mcpu=sm_20 | FileCheck %s
+
+; CHECK: imad
+define i32 @imad(i32 %a, i32 %b, i32 %c) {
+; CHECK: mad.lo.s32
+ %val0 = mul i32 %a, %b
+ %val1 = add i32 %val0, %c
+ ret i32 %val1
+}
OpenPOWER on IntegriCloud