[clang] [llvm] [Clang] Add `__builtin_stack_address` (PR #148281)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 9 05:34:01 PDT 2025


================
@@ -3680,6 +3681,7 @@ bool SelectionDAGLegalize::ExpandNode(SDNode *Node) {
     Results.push_back(Tmp1);
     break;
   }
+  case ISD::STACKADDRESS:
   case ISD::STACKSAVE:
     // Expand to CopyFromReg if the target set
     // StackPointerRegisterToSaveRestore.
----------------
nikic wrote:

Yes, I think something like that would be fine. @arsenm Any reason not to use DiagnosticInfoUnsupported (rather than report_fatal_error) for a legalization failure?

https://github.com/llvm/llvm-project/pull/148281


More information about the llvm-commits mailing list