summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/X86/mulx64.ll
diff options
context:
space:
mode:
authorMichael Liao <michael.liao@intel.com>2012-09-26 08:22:37 +0000
committerMichael Liao <michael.liao@intel.com>2012-09-26 08:22:37 +0000
commitf9f7b5518ab21d0023fc73d233a4ef236f7e3846 (patch)
tree63ad9899a6f24d7ef996b021ade046f0e8669502 /llvm/test/CodeGen/X86/mulx64.ll
parentdd9602fe935d500d10acde5798ee659488d6921e (diff)
downloadbcm5719-llvm-f9f7b5518ab21d0023fc73d233a4ef236f7e3846.tar.gz
bcm5719-llvm-f9f7b5518ab21d0023fc73d233a4ef236f7e3846.zip
Add MULX code generation support
llvm-svn: 164673
Diffstat (limited to 'llvm/test/CodeGen/X86/mulx64.ll')
-rw-r--r--llvm/test/CodeGen/X86/mulx64.ll22
1 files changed, 22 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/mulx64.ll b/llvm/test/CodeGen/X86/mulx64.ll
new file mode 100644
index 00000000000..c59adc6069d
--- /dev/null
+++ b/llvm/test/CodeGen/X86/mulx64.ll
@@ -0,0 +1,22 @@
+; RUN: llc -mcpu=core-avx2 -march=x86-64 < %s | FileCheck %s
+
+define i128 @f1(i64 %a, i64 %b) {
+ %x = zext i64 %a to i128
+ %y = zext i64 %b to i128
+ %r = mul i128 %x, %y
+; CHECK: f1
+; CHECK: mulxq
+; CHECK: ret
+ ret i128 %r
+}
+
+define i128 @f2(i64 %a, i64* %p) {
+ %b = load i64* %p
+ %x = zext i64 %a to i128
+ %y = zext i64 %b to i128
+ %r = mul i128 %x, %y
+; CHECK: f1
+; CHECK: mulxq ({{.+}}), %{{.+}}, %{{.+}}
+; CHECK: ret
+ ret i128 %r
+}
OpenPOWER on IntegriCloud