[llvm] r350991 - [X86] Remove unnecessary code from getMaskNode.
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 11 22:13:44 PST 2019
Author: ctopper
Date: Fri Jan 11 22:13:44 2019
New Revision: 350991
URL: http://llvm.org/viewvc/llvm-project?rev=350991&view=rev
Log:
[X86] Remove unnecessary code from getMaskNode.
We no longer need to extend mask scalars before bitcasting them to vXi1. This was only needed for the truncate intrinsics. And was really a bug in our lowering of them.
Modified:
llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=350991&r1=350990&r2=350991&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Fri Jan 11 22:13:44 2019
@@ -21332,11 +21332,7 @@ static SDValue getMaskNode(SDValue Mask,
if (X86::isZeroNode(Mask))
return DAG.getConstant(0, dl, MaskVT);
- if (MaskVT.bitsGT(Mask.getSimpleValueType())) {
- // Mask should be extended
- Mask = DAG.getNode(ISD::ANY_EXTEND, dl,
- MVT::getIntegerVT(MaskVT.getSizeInBits()), Mask);
- }
+ assert(MaskVT.bitsLE(Mask.getSimpleValueType()) && "Unexpected mask size!");
if (Mask.getSimpleValueType() == MVT::i64 && Subtarget.is32Bit()) {
assert(MaskVT == MVT::v64i1 && "Expected v64i1 mask!");
More information about the llvm-commits
mailing list