We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e040474 commit 8725b67Copy full SHA for 8725b67
llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
@@ -9159,6 +9159,7 @@ SDValue TargetLowering::expandABS(SDNode *N, SelectionDAG &DAG,
9159
if (!IsNegative && isOperationLegal(ISD::SUB, VT) &&
9160
isOperationLegal(ISD::SMAX, VT)) {
9161
SDValue Zero = DAG.getConstant(0, dl, VT);
9162
+ Op = DAG.getFreeze(Op);
9163
return DAG.getNode(ISD::SMAX, dl, VT, Op,
9164
DAG.getNode(ISD::SUB, dl, VT, Zero, Op));
9165
}
@@ -9175,8 +9176,8 @@ SDValue TargetLowering::expandABS(SDNode *N, SelectionDAG &DAG,
9175
9176
// 0 - abs(x) -> smin(x, sub(0,x))
9177
if (IsNegative && isOperationLegal(ISD::SUB, VT) &&
9178
isOperationLegal(ISD::SMIN, VT)) {
- Op = DAG.getFreeze(Op);
9179
9180
9181
return DAG.getNode(ISD::SMIN, dl, VT, Op,
9182
9183
0 commit comments