[llvm-commits] [llvm] r48247 - /llvm/trunk/test/CodeGen/X86/all-ones-vector.ll

Dan Gohman gohman at apple.com
Tue Mar 11 14:37:00 PDT 2008


Author: djg
Date: Tue Mar 11 16:37:00 2008
New Revision: 48247

URL: http://llvm.org/viewvc/llvm-project?rev=48247&view=rev
Log:
Add a test to ensure that all-ones vectors are materialized with pcmpeqd.

Added:
    llvm/trunk/test/CodeGen/X86/all-ones-vector.ll

Added: llvm/trunk/test/CodeGen/X86/all-ones-vector.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/all-ones-vector.ll?rev=48247&view=auto

==============================================================================
--- llvm/trunk/test/CodeGen/X86/all-ones-vector.ll (added)
+++ llvm/trunk/test/CodeGen/X86/all-ones-vector.ll Tue Mar 11 16:37:00 2008
@@ -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>
+}





More information about the llvm-commits mailing list