mirror of
https://github.com/intel/llvm.git
synced 2026-01-25 01:07:04 +08:00
[X86] scalarizeExtEltFP - don't assume setcc result pre-legalisation will be vXi1
Another fold may have generated the setcc using getSetCCResultType Encountered this while investigating topological sorting of dag nodes
This commit is contained in:
@@ -46802,9 +46802,8 @@ static SDValue scalarizeExtEltFP(SDNode *ExtElt, SelectionDAG &DAG,
|
||||
// need to convert vector bool to a scalar bool.
|
||||
if (DCI.isBeforeLegalize() && Vec.getOpcode() == ISD::VSELECT &&
|
||||
Vec.getOperand(0).getOpcode() == ISD::SETCC &&
|
||||
Vec.getOperand(0).getOperand(0).getValueType() == VecVT) {
|
||||
assert(Vec.getOperand(0).getValueType().getScalarType() == MVT::i1 &&
|
||||
"Unexpected cond type for combine");
|
||||
Vec.getOperand(0).getOperand(0).getValueType() == VecVT &&
|
||||
Vec.getOperand(0).getValueType().getScalarType() == MVT::i1) {
|
||||
// ext (sel Cond, X, Y), 0 --> sel (ext Cond, 0), (ext X, 0), (ext Y, 0)
|
||||
SDLoc DL(ExtElt);
|
||||
SDValue Ext0 = DAG.getNode(ISD::EXTRACT_VECTOR_ELT, DL,
|
||||
|
||||
Reference in New Issue
Block a user