aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/X86/all-ones-vector.ll
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-03-11 21:37:00 +0000
committerDan Gohman <gohman@apple.com>2008-03-11 21:37:00 +0000
commit6a6d27ac0b7607c0ad76a55bc4bd8897fe502c49 (patch)
tree11ed2b5c7f700889f3d6419a706052c0ce9e1439 /test/CodeGen/X86/all-ones-vector.ll
parentc1f53c742620dd4f2460685477303002bba8a8d8 (diff)
downloadexternal_llvm-6a6d27ac0b7607c0ad76a55bc4bd8897fe502c49.zip
external_llvm-6a6d27ac0b7607c0ad76a55bc4bd8897fe502c49.tar.gz
external_llvm-6a6d27ac0b7607c0ad76a55bc4bd8897fe502c49.tar.bz2
Add a test to ensure that all-ones vectors are materialized with pcmpeqd.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48247 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/all-ones-vector.ll')
-rw-r--r--test/CodeGen/X86/all-ones-vector.ll14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/CodeGen/X86/all-ones-vector.ll b/test/CodeGen/X86/all-ones-vector.ll
new file mode 100644
index 0000000..a79002b
--- /dev/null
+++ b/test/CodeGen/X86/all-ones-vector.ll
@@ -0,0 +1,14 @@
+; RUN: llvm-as < %s | llc -march=x86 | grep pcmpeqd | count 4
+
+define <4 x i32> @ioo() {
+ ret <4 x i32> <i32 -1, i32 -1, i32 -1, i32 -1>
+}
+define <2 x i64> @loo() {
+ ret <2 x i64> <i64 -1, i64 -1>
+}
+define <2 x double> @doo() {
+ ret <2 x double> <double 0xffffffffffffffff, double 0xffffffffffffffff>
+}
+define <4 x float> @foo() {
+ ret <4 x float> <float 0xffffffffe0000000, float 0xffffffffe0000000, float 0xffffffffe0000000, float 0xffffffffe0000000>
+}