Fix build failure revealed by c35ca3a1c7

This commit resolves a Linux kernel build failure that was revealed by
c35ca3a1c7. The patch introduces two new
intrinsics, which ultimately changes the intrinsic numbering of other PPC
intrinsics. This causes an issue introduced by
ff40fb07ad, as the patch checks for intrinsics
with particular values, but the addition of the fnabs/fnabss intrinsics updates
the original sqrt/sdiv intrinsic values.
This commit is contained in:
Amy Kwan 2022-05-24 16:11:23 -05:00
parent cdd54cbdd9
commit 0bf3c38b0b
1 changed files with 2 additions and 1 deletions

View File

@ -4646,7 +4646,8 @@ static bool mayUseP9Setb(SDNode *N, const ISD::CondCode &CC, SelectionDAG *DAG,
static bool isSWTestOp(SDValue N) { static bool isSWTestOp(SDValue N) {
if (N.getOpcode() == PPCISD::FTSQRT) if (N.getOpcode() == PPCISD::FTSQRT)
return true; return true;
if (N.getNumOperands() < 1 || !isa<ConstantSDNode>(N.getOperand(0))) if (N.getNumOperands() < 1 || !isa<ConstantSDNode>(N.getOperand(0)) ||
N.getOpcode() != ISD::INTRINSIC_WO_CHAIN)
return false; return false;
switch (N.getConstantOperandVal(0)) { switch (N.getConstantOperandVal(0)) {
case Intrinsic::ppc_vsx_xvtdivdp: case Intrinsic::ppc_vsx_xvtdivdp: