[llvm] [NVPTX] Attempt to load params using symbol addition node directly (PR #119935)
Artem Belevich via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 10 11:23:13 PST 2025
================
@@ -2473,17 +2473,27 @@ bool NVPTXDAGToDAGISel::SelectDirectAddr(SDValue N, SDValue &Address) {
}
// symbol+offset
-bool NVPTXDAGToDAGISel::SelectADDRsi_imp(
- SDNode *OpNode, SDValue Addr, SDValue &Base, SDValue &Offset, MVT mvt) {
- if (Addr.getOpcode() == ISD::ADD) {
- if (ConstantSDNode *CN = dyn_cast<ConstantSDNode>(Addr.getOperand(1))) {
- SDValue base = Addr.getOperand(0);
- if (SelectDirectAddr(base, Base)) {
- Offset = CurDAG->getTargetConstant(CN->getZExtValue(), SDLoc(OpNode),
- mvt);
- return true;
+bool NVPTXDAGToDAGISel::SelectADDRsi_imp(SDNode *OpNode, SDValue Addr,
+ SDValue &Base, SDValue &Offset,
+ MVT mvt) {
----------------
Artem-B wrote:
One way to look at it -- if you land the patch, the changes in the patch should conform to the style rules. If you spot other similar style violations, fixing them is a task that's somewhat independent of this patch, but their existence is usually not an excuse for the given patch not following the rules.
Ideally, NFC cleanup should be done first, so it's independent of the functional changes.
However, often the "we'll fix it later" things don't materialize, so incorporating cosmetic changes into the code that's being changed by the patch captures some of that clean up right now, and it does not impede follow-up cleanups.
So, if you want to land a cleanup CL separately, that would be appreciated. Fixing this style nit in this patch only is OK, too.
https://github.com/llvm/llvm-project/pull/119935
More information about the llvm-commits
mailing list