summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen
diff options
context:
space:
mode:
authorMichael Kuperstein <mkuper@google.com>2016-06-17 20:21:17 +0000
committerMichael Kuperstein <mkuper@google.com>2016-06-17 20:21:17 +0000
commit18d6d3d95ef4b172ae753bb11b69f0f78218e0a5 (patch)
treebb93d2d8c8beb9d27fe19e3ae02e471f311f4b91 /llvm/test/CodeGen
parentd6f2355f25eab6be5fa845590fd7fee21b95b87d (diff)
downloadbcm5719-llvm-18d6d3d95ef4b172ae753bb11b69f0f78218e0a5.tar.gz
bcm5719-llvm-18d6d3d95ef4b172ae753bb11b69f0f78218e0a5.zip
[X86] Add missing AVX512 anyext patterns.
Add AVX512 anyext patterns for i16 and i64, modeled on the existing i8 and i32 patterns. llvm-svn: 273038
Diffstat (limited to 'llvm/test/CodeGen')
-rw-r--r--llvm/test/CodeGen/X86/pr28173.ll40
1 files changed, 40 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/pr28173.ll b/llvm/test/CodeGen/X86/pr28173.ll
new file mode 100644
index 00000000000..81c10bb3757
--- /dev/null
+++ b/llvm/test/CodeGen/X86/pr28173.ll
@@ -0,0 +1,40 @@
+; RUN: llc -mattr=+avx512f < %s | FileCheck %s
+target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target triple = "x86_64-unknown-linux-gnu"
+
+; Note that the kmovs should really *not* appear in the output, this is an
+; artifact of the current poor lowering. This is tracked by PR28175.
+
+; CHECK-LABEL: @foo64
+; CHECK: kmov
+; CHECK: kmov
+; CHECK: orq $-2, %rax
+; CHECK: ret
+define i64 @foo64(i1 zeroext %i, i32 %j) #0 {
+ br label %bb
+
+bb:
+ %z = zext i1 %i to i64
+ %v = or i64 %z, -2
+ br label %end
+
+end:
+ ret i64 %v
+}
+
+; CHECK-LABEL: @foo16
+; CHECK: kmov
+; CHECK: kmov
+; CHECK: orl $65534, %eax
+; CHECK: retq
+define i16 @foo16(i1 zeroext %i, i32 %j) #0 {
+ br label %bb
+
+bb:
+ %z = zext i1 %i to i16
+ %v = or i16 %z, -2
+ br label %end
+
+end:
+ ret i16 %v
+}
OpenPOWER on IntegriCloud