-
Notifications
You must be signed in to change notification settings - Fork 12.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[NVPTX] Fix DwarfFrameBase construction #101000
Conversation
The `{0}` here was initializing the first union member `Register`, rather than the union member used by CFA, which is `Location`. Prior to llvm#99263 this was harmless, but now they have different layout, leading to test failures on some platforms.
@llvm/pr-subscribers-backend-nvptx Author: Nikita Popov (nikic) ChangesThe Full diff: https://github.com/llvm/llvm-project/pull/101000.diff 1 Files Affected:
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;
}
|
I can't test on 32-bit ARM, but it should fix them there as well, yes. |
Thanks for the fix @nikic |
/cherry-pick 842a332 |
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). (cherry picked from commit 842a332)
/pull-request #101145 |
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). (cherry picked from commit 842a332)
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).
The
{0}
here was initializing the first union memberRegister
, rather than the union member used by CFA, which isOffset
. Prior to #99263 this was harmless, but now they have different layout, leading to test failures on some platforms (at least i686 and s390x).