Summary: I don't think this is necessary with i1 being illegal now.
Reviewers: RKSimon, zvi, guyblank
Reviewed By: RKSimon
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D38784
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315469
91177308-0d34-0410-b5e6-
96231b3b80d8
SDValue In = Op.getOperand(0);
MVT InVT = In.getSimpleValueType();
- if (VT == MVT::i1) {
- assert((InVT.isInteger() && (InVT.getSizeInBits() <= 64)) &&
- "Invalid scalar TRUNCATE operation");
- if (InVT.getSizeInBits() >= 32)
- return SDValue();
- In = DAG.getNode(ISD::ANY_EXTEND, DL, MVT::i32, In);
- return DAG.getNode(ISD::TRUNCATE, DL, VT, In);
- }
assert(VT.getVectorNumElements() == InVT.getVectorNumElements() &&
"Invalid TRUNCATE operation");