From b2c7673442f385b0e1facaf3153b8a3d2eeb02a2 Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Sun, 7 Dec 2014 17:15:58 +0000 Subject: [PATCH] [x86] Switch a constant selection test to use positive assertions and to store to real pointers so that its clear that the right code is in fact being generated. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223612 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/X86/vector-shuffle-128-v16.ll | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/test/CodeGen/X86/vector-shuffle-128-v16.ll b/test/CodeGen/X86/vector-shuffle-128-v16.ll index a0bfe8f29b0..7c92a263667 100644 --- a/test/CodeGen/X86/vector-shuffle-128-v16.ll +++ b/test/CodeGen/X86/vector-shuffle-128-v16.ll @@ -1066,13 +1066,25 @@ entry: ret <16 x i8> %s.2.0 } -define void @constant_gets_selected() { -; ALL-LABEL: constant_gets_selected: -; ALL-NOT movd $0, {{%xmm[0-9]+}} +define void @constant_gets_selected(<4 x i32>* %ptr1, <4 x i32>* %ptr2) { +; SSE-LABEL: constant_gets_selected: +; SSE: # BB#0: # %entry +; SSE-NEXT: xorps %xmm0, %xmm0 +; SSE-NEXT: movaps %xmm0, (%rdi) +; SSE-NEXT: movaps %xmm0, (%rsi) +; SSE-NEXT: retq +; +; AVX-LABEL: constant_gets_selected: +; AVX: # BB#0: # %entry +; AVX-NEXT: vxorps %xmm0, %xmm0, %xmm0 +; AVX-NEXT: vmovaps %xmm0, (%rdi) +; AVX-NEXT: vmovaps %xmm0, (%rsi) +; AVX-NEXT: retq +entry: %weird_zero = bitcast <4 x i32> zeroinitializer to <16 x i8> %shuffle.i = shufflevector <16 x i8> , <16 x i8> %weird_zero, <16 x i32> %weirder_zero = bitcast <16 x i8> %shuffle.i to <4 x i32> - store <4 x i32> %weirder_zero, <4 x i32>* undef, align 16 - store <4 x i32> zeroinitializer, <4 x i32>* undef, align 16 + store <4 x i32> %weirder_zero, <4 x i32>* %ptr1, align 16 + store <4 x i32> zeroinitializer, <4 x i32>* %ptr2, align 16 ret void } -- 2.34.1