Skip to content

Commit d960e6e

Browse files
author
Oscar Smith
committed
scalarize vector clmul on error
1 parent 4dfc106 commit d960e6e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8288,13 +8288,15 @@ SDValue TargetLowering::expandCLMUL(SDNode *Node,
82888288
EVT SetCCType =
82898289
getSetCCResultType(DAG.getDataLayout(), *DAG.getContext(), VT);
82908290
// Only expand vector types if we have the appropriate vector bit operations.
8291+
// FIXME: Should really try to split the vector in case it's legal on a
8292+
// subvector.
82918293
if (VT.isVector() && (!isPowerOf2_32(NumBitsPerElt) ||
82928294
(!isOperationLegalOrCustom(ISD::SRL, VT) ||
82938295
!isOperationLegalOrCustom(ISD::SHL, VT) ||
82948296
!isOperationLegalOrCustom(ISD::XOR, VT) ||
82958297
!isOperationLegalOrCustom(ISD::AND, VT) ||
82968298
!isOperationLegalOrCustom(ISD::SELECT, VT))))
8297-
return SDValue();
8299+
return DAG.UnrollVectorOp(Node);
82988300

82998301
SDValue Res = DAG.getConstant(0, DL, VT);
83008302
SDValue Zero = DAG.getConstant(0, DL, VT);

0 commit comments

Comments
 (0)