diff --git a/llvm/include/llvm/CodeGen/SelectionDAGNodes.h b/llvm/include/llvm/CodeGen/SelectionDAGNodes.h index 4df56aac4aa17..05c0b9674e98b 100644 --- a/llvm/include/llvm/CodeGen/SelectionDAGNodes.h +++ b/llvm/include/llvm/CodeGen/SelectionDAGNodes.h @@ -3080,53 +3080,53 @@ namespace ISD { /// Returns true if the specified node is a non-extending and unindexed load. inline bool isNormalLoad(const SDNode *N) { - const LoadSDNode *Ld = dyn_cast(N); + auto *Ld = dyn_cast(N); return Ld && Ld->getExtensionType() == ISD::NON_EXTLOAD && - Ld->getAddressingMode() == ISD::UNINDEXED; + Ld->getAddressingMode() == ISD::UNINDEXED; } /// Returns true if the specified node is a non-extending load. inline bool isNON_EXTLoad(const SDNode *N) { - return isa(N) && - cast(N)->getExtensionType() == ISD::NON_EXTLOAD; + auto *Ld = dyn_cast(N); + return Ld && Ld->getExtensionType() == ISD::NON_EXTLOAD; } /// Returns true if the specified node is a EXTLOAD. inline bool isEXTLoad(const SDNode *N) { - return isa(N) && - cast(N)->getExtensionType() == ISD::EXTLOAD; + auto *Ld = dyn_cast(N); + return Ld && Ld->getExtensionType() == ISD::EXTLOAD; } /// Returns true if the specified node is a SEXTLOAD. inline bool isSEXTLoad(const SDNode *N) { - return isa(N) && - cast(N)->getExtensionType() == ISD::SEXTLOAD; + auto *Ld = dyn_cast(N); + return Ld && Ld->getExtensionType() == ISD::SEXTLOAD; } /// Returns true if the specified node is a ZEXTLOAD. inline bool isZEXTLoad(const SDNode *N) { - return isa(N) && - cast(N)->getExtensionType() == ISD::ZEXTLOAD; + auto *Ld = dyn_cast(N); + return Ld && Ld->getExtensionType() == ISD::ZEXTLOAD; } /// Returns true if the specified node is an unindexed load. inline bool isUNINDEXEDLoad(const SDNode *N) { - return isa(N) && - cast(N)->getAddressingMode() == ISD::UNINDEXED; + auto *Ld = dyn_cast(N); + return Ld && Ld->getAddressingMode() == ISD::UNINDEXED; } /// Returns true if the specified node is a non-truncating /// and unindexed store. inline bool isNormalStore(const SDNode *N) { - const StoreSDNode *St = dyn_cast(N); + auto *St = dyn_cast(N); return St && !St->isTruncatingStore() && - St->getAddressingMode() == ISD::UNINDEXED; + St->getAddressingMode() == ISD::UNINDEXED; } /// Returns true if the specified node is an unindexed store. inline bool isUNINDEXEDStore(const SDNode *N) { - return isa(N) && - cast(N)->getAddressingMode() == ISD::UNINDEXED; + auto *St = dyn_cast(N); + return St && St->getAddressingMode() == ISD::UNINDEXED; } /// Attempt to match a unary predicate against a scalar/splat constant or