[X86] When emitting masked loads/stores don't check for all ones mask.

This seems like a premature optimization. It's unlikely a user would pass something the frontend can tell is all ones to the masked load/store intrinsics.

We do this optimization for emitting select for masking because we have builtin calls in header files that pass an all ones mask in. Though at this point we may not longer have any builtins that emit some IR and a select. We may only have the select builtins so maybe we can remove that optimization too.

llvm-svn: 333847
This commit is contained in:
Craig Topper 2018-06-03 18:08:36 +00:00
parent 10229af755
commit 21f56f5b9c
1 changed files with 0 additions and 10 deletions

View File

@ -8269,11 +8269,6 @@ static Value *EmitX86MaskedStore(CodeGenFunction &CGF,
Ops[0] = CGF.Builder.CreateBitCast(Ops[0],
llvm::PointerType::getUnqual(Ops[1]->getType()));
// If the mask is all ones just emit a regular store.
if (const auto *C = dyn_cast<Constant>(Ops[2]))
if (C->isAllOnesValue())
return CGF.Builder.CreateAlignedStore(Ops[1], Ops[0], Align);
Value *MaskVec = getMaskVecValue(CGF, Ops[2],
Ops[1]->getType()->getVectorNumElements());
@ -8286,11 +8281,6 @@ static Value *EmitX86MaskedLoad(CodeGenFunction &CGF,
Ops[0] = CGF.Builder.CreateBitCast(Ops[0],
llvm::PointerType::getUnqual(Ops[1]->getType()));
// If the mask is all ones just emit a regular store.
if (const auto *C = dyn_cast<Constant>(Ops[2]))
if (C->isAllOnesValue())
return CGF.Builder.CreateAlignedLoad(Ops[0], Align);
Value *MaskVec = getMaskVecValue(CGF, Ops[2],
Ops[1]->getType()->getVectorNumElements());