Skip to content

Commit

Permalink
[NVPTX] Fix DwarfFrameBase construction (llvm#101000)
Browse files Browse the repository at this point in the history
The `{0}` here was initializing the first union member `Register`,
rather than the union member used by CFA, which is `Offset`. Prior to
llvm#99263 this was harmless, but
now they have different layout, leading to test failures on some
platforms (at least i686 and s390x).
  • Loading branch information
nikic committed Jul 29, 2024
1 parent cfb92be commit 842a332
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion llvm/lib/Target/NVPTX/NVPTXFrameLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

0 comments on commit 842a332

Please sign in to comment.