summaryrefslogtreecommitdiffstats
path: root/test/CodeGen/X86/umul-with-overflow.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/X86/umul-with-overflow.ll')
-rw-r--r--test/CodeGen/X86/umul-with-overflow.ll8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/CodeGen/X86/umul-with-overflow.ll b/test/CodeGen/X86/umul-with-overflow.ll
new file mode 100644
index 0000000..d522bd8
--- /dev/null
+++ b/test/CodeGen/X86/umul-with-overflow.ll
@@ -0,0 +1,8 @@
+; RUN: llc < %s -march=x86 | grep "\\\\\\\<mul"
+
+declare {i32, i1} @llvm.umul.with.overflow.i32(i32 %a, i32 %b)
+define i1 @a(i32 %x) zeroext nounwind {
+ %res = call {i32, i1} @llvm.umul.with.overflow.i32(i32 %x, i32 3)
+ %obil = extractvalue {i32, i1} %res, 1
+ ret i1 %obil
+}