[all-commits] [llvm/llvm-project] 9e0ca5: [X86] When expanding LCMPXCHG16B_SAVE_RBX, substit...
Aaron Puchert via All-commits
all-commits at lists.llvm.org
Thu Apr 3 06:57:14 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 9e0ca5720bee96f4b19eeb69a119b5eda3ab5528
https://github.com/llvm/llvm-project/commit/9e0ca5720bee96f4b19eeb69a119b5eda3ab5528
Author: Aaron Puchert <aaron.puchert at sap.com>
Date: 2025-04-03 (Thu, 03 Apr 2025)
Changed paths:
M llvm/lib/Target/X86/X86ExpandPseudo.cpp
M llvm/test/CodeGen/X86/base-pointer-and-cmpxchg.ll
Log Message:
-----------
[X86] When expanding LCMPXCHG16B_SAVE_RBX, substitute RBX in base (#134109)
The pseudo-instruction LCMPXCHG16B_SAVE_RBX is used when RBX serves as
frame base pointer. At a very late stage it is then translated into a
regular LCMPXCHG16B, preceded by copying the actual argument into RBX,
and followed by restoring the register to the base pointer.
However, in case the `cmpxchg` operates on a local variable, RBX might
also be used as a base for the memory operand in frame finalization, and
we've overwritten RBX with the input operand for `cmpxchg16b`. So we
have to rewrite the memory operand base to use the saved value of RBX.
Fixes #119959.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list