Skip to content

Conversation

@arsenm
Copy link
Contributor

@arsenm arsenm commented Dec 4, 2025

Return the input chain at the callsite, not the entry node
chain. Presumably this could cause issues somewhere.

Return the input chain at the callsite, not the entry node
chain. Presumably this could cause issues somewhere.
Copy link
Contributor Author

arsenm commented Dec 4, 2025

@llvmbot
Copy link
Member

llvmbot commented Dec 4, 2025

@llvm/pr-subscribers-backend-amdgpu

Author: Matt Arsenault (arsenm)

Changes

Return the input chain at the callsite, not the entry node
chain. Presumably this could cause issues somewhere.


Full diff: https://github.com/llvm/llvm-project/pull/170645.diff

1 Files Affected:

  • (modified) llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp (+1-1)
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp b/llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
index 5be5c66ba17dc..ba80c0695115c 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
@@ -1412,7 +1412,7 @@ SDValue AMDGPUTargetLowering::lowerUnhandledCall(CallLoweringInfo &CLI,
       InVals.push_back(DAG.getPOISON(Arg.VT));
   }
 
-  return DAG.getEntryNode();
+  return CLI.Chain;
 }
 
 SDValue AMDGPUTargetLowering::LowerCall(CallLoweringInfo &CLI,

Copy link
Contributor

@ro-i ro-i left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems to make sense to me to not throw away everything the chain did up to that point

@arsenm arsenm merged commit b8b7eda into main Dec 4, 2025
14 checks passed
@arsenm arsenm deleted the users/arsenm/amdgpu/use-correct-chain-unhandled-call branch December 4, 2025 13:26
kcloudy0717 pushed a commit to kcloudy0717/llvm-project that referenced this pull request Dec 4, 2025
Return the input chain at the callsite, not the entry node
chain. Presumably this could cause issues somewhere.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants