llvm-project
c327ab35 - [AArch64] Fix Windows target detection in FrameLowering (#204347)

Commit
135 days ago
[AArch64] Fix Windows target detection in FrameLowering (#204347) In #156467, we switched to using `getMCAsmInfo()->usesWindowsCFI()` to recognize "Windows". This does not include Windows triples with ELF binary formats. So, for aarch64-pc-windows-msvc-elf we would use the Windows callee-save list in `AArch64RegisterInfo::getCalleeSavedRegs()`, but FrameLowering would handle this like Linux, and fail to invalidate the (x29, x28) pairing. This patch switches back to using AArch64Subtarget::isTargetWindows(), which aligns with getCalleeSavedRegs(). Note: We were using `usesWindowsCFI()` to include UEFI targets, however, there does not seem to be tests/support for UEFI triples on AArch64 (basic examples that compile for x86 fail: https://godbolt.org/z/dPWdTrEG7). So, this has been moved to a TODO. Fixes #204060
Author
Parents
Loading