From b6f09c6727b4d0bd08f399f212d671daaf010e56 Mon Sep 17 00:00:00 2001 From: Kevin McAfee Date: Fri, 10 Jan 2025 20:06:04 -0500 Subject: [PATCH] [NFC][NVPTX] Small style cleanup for NVPTXISelDAGToDAG.* (#122538) --- llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp | 20 +++++++++++--------- llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.h | 4 ++-- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp b/llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp index 1341f8a8fca1fbc..39f55716920584d 100644 --- a/llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp +++ b/llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp @@ -2479,14 +2479,15 @@ bool NVPTXDAGToDAGISel::SelectDirectAddr(SDValue N, SDValue &Address) { } // symbol+offset -bool NVPTXDAGToDAGISel::SelectADDRsi_imp( - SDNode *OpNode, SDValue Addr, SDValue &Base, SDValue &Offset, MVT mvt) { +bool NVPTXDAGToDAGISel::SelectADDRsi_imp(SDNode *OpNode, SDValue Addr, + SDValue &Base, SDValue &Offset, + MVT VT) { if (isAddLike(Addr)) { if (ConstantSDNode *CN = dyn_cast(Addr.getOperand(1))) { SDValue base = Addr.getOperand(0); if (SelectDirectAddr(base, Base)) { - Offset = CurDAG->getTargetConstant(CN->getZExtValue(), SDLoc(OpNode), - mvt); + Offset = + CurDAG->getTargetConstant(CN->getZExtValue(), SDLoc(OpNode), VT); return true; } } @@ -2507,11 +2508,12 @@ bool NVPTXDAGToDAGISel::SelectADDRsi64(SDNode *OpNode, SDValue Addr, } // register+offset -bool NVPTXDAGToDAGISel::SelectADDRri_imp( - SDNode *OpNode, SDValue Addr, SDValue &Base, SDValue &Offset, MVT mvt) { +bool NVPTXDAGToDAGISel::SelectADDRri_imp(SDNode *OpNode, SDValue Addr, + SDValue &Base, SDValue &Offset, + MVT VT) { if (FrameIndexSDNode *FIN = dyn_cast(Addr)) { - Base = CurDAG->getTargetFrameIndex(FIN->getIndex(), mvt); - Offset = CurDAG->getTargetConstant(0, SDLoc(OpNode), mvt); + Base = CurDAG->getTargetFrameIndex(FIN->getIndex(), VT); + Offset = CurDAG->getTargetConstant(0, SDLoc(OpNode), VT); return true; } if (Addr.getOpcode() == ISD::TargetExternalSymbol || @@ -2526,7 +2528,7 @@ bool NVPTXDAGToDAGISel::SelectADDRri_imp( if (FrameIndexSDNode *FIN = dyn_cast(Addr.getOperand(0))) // Constant offset from frame ref. - Base = CurDAG->getTargetFrameIndex(FIN->getIndex(), mvt); + Base = CurDAG->getTargetFrameIndex(FIN->getIndex(), VT); else Base = Addr.getOperand(0); diff --git a/llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.h b/llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.h index 4b67a370c3fe09c..8cadde8a822647f 100644 --- a/llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.h +++ b/llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.h @@ -106,13 +106,13 @@ class LLVM_LIBRARY_VISIBILITY NVPTXDAGToDAGISel : public SelectionDAGISel { bool SelectDirectAddr(SDValue N, SDValue &Address); bool SelectADDRri_imp(SDNode *OpNode, SDValue Addr, SDValue &Base, - SDValue &Offset, MVT mvt); + SDValue &Offset, MVT VT); bool SelectADDRri(SDNode *OpNode, SDValue Addr, SDValue &Base, SDValue &Offset); bool SelectADDRri64(SDNode *OpNode, SDValue Addr, SDValue &Base, SDValue &Offset); bool SelectADDRsi_imp(SDNode *OpNode, SDValue Addr, SDValue &Base, - SDValue &Offset, MVT mvt); + SDValue &Offset, MVT VT); bool SelectADDRsi(SDNode *OpNode, SDValue Addr, SDValue &Base, SDValue &Offset); bool SelectADDRsi64(SDNode *OpNode, SDValue Addr, SDValue &Base,