Author: Nikita Popov Date: 2024-07-30T12:01:33+02:00 New Revision: 63d44ea32a28ed49e99572ca46b03eb92706433e
URL: https://github.com/llvm/llvm-project/commit/63d44ea32a28ed49e99572ca46b03eb92706433e DIFF: https://github.com/llvm/llvm-project/commit/63d44ea32a28ed49e99572ca46b03eb92706433e.diff LOG: [NVPTX] Fix DwarfFrameBase construction (#101000) The `{0}` here was initializing the first union member `Register`, rather than the union member used by CFA, which is `Offset`. Prior to https://github.com/llvm/llvm-project/pull/99263 this was harmless, but now they have different layout, leading to test failures on some platforms (at least i686 and s390x). (cherry picked from commit 842a332f11f53c698fa0560505e533ecdca28876) Added: Modified: llvm/lib/Target/NVPTX/NVPTXFrameLowering.cpp Removed: ################################################################################ diff --git a/llvm/lib/Target/NVPTX/NVPTXFrameLowering.cpp b/llvm/lib/Target/NVPTX/NVPTXFrameLowering.cpp index 10ae81e0460e3..9abe0e3186f20 100644 --- a/llvm/lib/Target/NVPTX/NVPTXFrameLowering.cpp +++ b/llvm/lib/Target/NVPTX/NVPTXFrameLowering.cpp @@ -93,5 +93,8 @@ MachineBasicBlock::iterator NVPTXFrameLowering::eliminateCallFramePseudoInstr( TargetFrameLowering::DwarfFrameBase NVPTXFrameLowering::getDwarfFrameBase(const MachineFunction &MF) const { - return {DwarfFrameBase::CFA, {0}}; + DwarfFrameBase FrameBase; + FrameBase.Kind = DwarfFrameBase::CFA; + FrameBase.Location.Offset = 0; + return FrameBase; } _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits