From 009b1c42aa6266385f2c37e227516b24077e6dd7 Mon Sep 17 00:00:00 2001 From: Ed Schouten Date: Tue, 2 Jun 2009 17:52:33 +0000 Subject: Import LLVM, at r72732. --- test/CodeGen/X86/vec_zero_cse.ll | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 test/CodeGen/X86/vec_zero_cse.ll (limited to 'test/CodeGen/X86/vec_zero_cse.ll') diff --git a/test/CodeGen/X86/vec_zero_cse.ll b/test/CodeGen/X86/vec_zero_cse.ll new file mode 100644 index 0000000000000..0ccf745e524e2 --- /dev/null +++ b/test/CodeGen/X86/vec_zero_cse.ll @@ -0,0 +1,35 @@ +; RUN: llvm-as < %s | llc -relocation-model=static -march=x86 -mcpu=yonah | grep pxor | count 1 +; RUN: llvm-as < %s | llc -relocation-model=static -march=x86 -mcpu=yonah | grep xorps | count 1 +; RUN: llvm-as < %s | llc -relocation-model=static -march=x86 -mcpu=yonah | grep pcmpeqd | count 2 + +@M1 = external global <1 x i64> +@M2 = external global <2 x i32> + +@S1 = external global <2 x i64> +@S2 = external global <4 x i32> + +define void @test() { + store <1 x i64> zeroinitializer, <1 x i64>* @M1 + store <2 x i32> zeroinitializer, <2 x i32>* @M2 + ret void +} + +define void @test2() { + store <1 x i64> < i64 -1 >, <1 x i64>* @M1 + store <2 x i32> < i32 -1, i32 -1 >, <2 x i32>* @M2 + ret void +} + +define void @test3() { + store <2 x i64> zeroinitializer, <2 x i64>* @S1 + store <4 x i32> zeroinitializer, <4 x i32>* @S2 + ret void +} + +define void @test4() { + store <2 x i64> < i64 -1, i64 -1>, <2 x i64>* @S1 + store <4 x i32> < i32 -1, i32 -1, i32 -1, i32 -1 >, <4 x i32>* @S2 + ret void +} + + -- cgit v1.2.3