[llvm] 0bf3c38 - Fix build failure revealed by c35ca3a1c78f693b749ad11742350b7fc6c5cd89

Amy Kwan via llvm-commits llvm-commits at lists.llvm.org
Tue May 24 14:32:34 PDT 2022


Author: Amy Kwan
Date: 2022-05-24T16:32:04-05:00
New Revision: 0bf3c38b0be3f9b45b589b780ed53f2de4d364d4

URL: https://github.com/llvm/llvm-project/commit/0bf3c38b0be3f9b45b589b780ed53f2de4d364d4
DIFF: https://github.com/llvm/llvm-project/commit/0bf3c38b0be3f9b45b589b780ed53f2de4d364d4.diff

LOG: Fix build failure revealed by c35ca3a1c78f693b749ad11742350b7fc6c5cd89

This commit resolves a Linux kernel build failure that was revealed by
c35ca3a1c78f693b749ad11742350b7fc6c5cd89. The patch introduces two new
intrinsics, which ultimately changes the intrinsic numbering of other PPC
intrinsics. This causes an issue introduced by
ff40fb07ad6309131c2448ca00572a078c7a2d59, as the patch checks for intrinsics
with particular values, but the addition of the fnabs/fnabss intrinsics updates
the original sqrt/sdiv intrinsic values.

Added: 
    

Modified: 
    llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp b/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
index fc1143e3d78e0..948ed51352d3b 100644
--- a/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
+++ b/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
@@ -4646,7 +4646,8 @@ static bool mayUseP9Setb(SDNode *N, const ISD::CondCode &CC, SelectionDAG *DAG,
 static bool isSWTestOp(SDValue N) {
   if (N.getOpcode() == PPCISD::FTSQRT)
     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;
   switch (N.getConstantOperandVal(0)) {
   case Intrinsic::ppc_vsx_xvtdivdp:


        


More information about the llvm-commits mailing list