summaryrefslogtreecommitdiff
path: root/test/CodeGen/NVPTX/imad.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/NVPTX/imad.ll')
-rw-r--r--test/CodeGen/NVPTX/imad.ll9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/CodeGen/NVPTX/imad.ll b/test/CodeGen/NVPTX/imad.ll
new file mode 100644
index 0000000000..67421c7cac
--- /dev/null
+++ b/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
+}