[DAGCombiner] move comment closer to the corresponding code; NFC
llvm-svn: 344255
This commit is contained in:
parent
e98be18311
commit
4875662e57
|
@ -15451,14 +15451,13 @@ SDValue DAGCombiner::ReplaceExtractVectorEltOfLoadWithNarrowedLoad(
|
|||
}
|
||||
|
||||
SDValue DAGCombiner::visitEXTRACT_VECTOR_ELT(SDNode *N) {
|
||||
// (vextract (scalar_to_vector val, 0) -> val
|
||||
SDValue InVec = N->getOperand(0);
|
||||
EVT VT = InVec.getValueType();
|
||||
EVT NVT = N->getValueType(0);
|
||||
|
||||
if (InVec.isUndef())
|
||||
return DAG.getUNDEF(NVT);
|
||||
|
||||
// (vextract (scalar_to_vector val, 0) -> val
|
||||
if (InVec.getOpcode() == ISD::SCALAR_TO_VECTOR) {
|
||||
// Check if the result type doesn't match the inserted element type. A
|
||||
// SCALAR_TO_VECTOR may truncate the inserted element and the
|
||||
|
|
Loading…
Reference in New Issue