forked from OSchip/llvm-project
[SelectionDAGBuilder] Remove unneeded vector bitcast from visitTargetIntrinsic.
This seems to be a leftover from a long time ago when there was an ISD::VBIT_CONVERT and a MVT::Vector. It looks like in those days the vector type was carried in a VTSDNode. As far as I know, these days ComputeValueTypes would have already assigned "Result" the same type we're getting from TLI.getValueType here. Thus the BITCAST is always a NOP. Verified by adding an assert and running check-llvm. Reviewed By: efriedma Differential Revision: https://reviews.llvm.org/D117335
This commit is contained in:
parent
6cc305764f
commit
e0841f6920
|
@ -4848,10 +4848,7 @@ void SelectionDAGBuilder::visitTargetIntrinsic(const CallInst &I,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!I.getType()->isVoidTy()) {
|
if (!I.getType()->isVoidTy()) {
|
||||||
if (VectorType *PTy = dyn_cast<VectorType>(I.getType())) {
|
if (!isa<VectorType>(I.getType()))
|
||||||
EVT VT = TLI.getValueType(DAG.getDataLayout(), PTy);
|
|
||||||
Result = DAG.getNode(ISD::BITCAST, getCurSDLoc(), VT, Result);
|
|
||||||
} else
|
|
||||||
Result = lowerRangeToAssertZExt(DAG, I, Result);
|
Result = lowerRangeToAssertZExt(DAG, I, Result);
|
||||||
|
|
||||||
MaybeAlign Alignment = I.getRetAlign();
|
MaybeAlign Alignment = I.getRetAlign();
|
||||||
|
|
Loading…
Reference in New Issue