From 2eab39f77b7c7a51d2623176e602b5b8b9e05272 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Sun, 11 Nov 2018 07:24:36 +0000 Subject: [PATCH] [X86] Use DAG.getConstant instead of getZeroVector. llvm-svn: 346605 --- llvm/lib/Target/X86/X86ISelLowering.cpp | 2 +- llvm/test/CodeGen/X86/pr34605.ll | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp index 4de8e3d7108c..6275e68db36d 100644 --- a/llvm/lib/Target/X86/X86ISelLowering.cpp +++ b/llvm/lib/Target/X86/X86ISelLowering.cpp @@ -17560,7 +17560,7 @@ static SDValue LowerZERO_EXTEND_Mask(SDValue Op, } SDValue One = DAG.getConstant(1, DL, WideVT); - SDValue Zero = getZeroVector(WideVT, Subtarget, DAG, DL); + SDValue Zero = DAG.getConstant(0, DL, WideVT); SDValue SelectedVal = DAG.getSelect(DL, WideVT, In, One, Zero); diff --git a/llvm/test/CodeGen/X86/pr34605.ll b/llvm/test/CodeGen/X86/pr34605.ll index 95459ce960a0..4c1a3d7781e2 100644 --- a/llvm/test/CodeGen/X86/pr34605.ll +++ b/llvm/test/CodeGen/X86/pr34605.ll @@ -18,15 +18,15 @@ define void @pr34605(i8* nocapture %s, i32 %p) { ; CHECK-NEXT: kmovd %k1, %k1 ; CHECK-NEXT: kandq %k1, %k0, %k1 ; CHECK-NEXT: vmovdqu8 {{\.LCPI.*}}, %zmm0 {%k1} {z} -; CHECK-NEXT: vxorps %xmm1, %xmm1, %xmm1 ; CHECK-NEXT: vmovdqu64 %zmm0, (%eax) -; CHECK-NEXT: vmovups %zmm1, 64(%eax) -; CHECK-NEXT: vmovups %zmm1, 128(%eax) -; CHECK-NEXT: vmovups %zmm1, 192(%eax) -; CHECK-NEXT: vmovups %zmm1, 256(%eax) -; CHECK-NEXT: vmovups %zmm1, 320(%eax) -; CHECK-NEXT: vmovups %zmm1, 384(%eax) -; CHECK-NEXT: vmovups %zmm1, 448(%eax) +; CHECK-NEXT: vpxor %xmm0, %xmm0, %xmm0 +; CHECK-NEXT: vmovdqu64 %zmm0, 64(%eax) +; CHECK-NEXT: vmovdqu64 %zmm0, 128(%eax) +; CHECK-NEXT: vmovdqu64 %zmm0, 192(%eax) +; CHECK-NEXT: vmovdqu64 %zmm0, 256(%eax) +; CHECK-NEXT: vmovdqu64 %zmm0, 320(%eax) +; CHECK-NEXT: vmovdqu64 %zmm0, 384(%eax) +; CHECK-NEXT: vmovdqu64 %zmm0, 448(%eax) ; CHECK-NEXT: vzeroupper ; CHECK-NEXT: retl entry: