[llvm] [PowerPC] Add patterns for atomic load with immediates (PR #200432)
Kai Nacke via llvm-commits
llvm-commits at lists.llvm.org
Fri May 29 08:34:09 PDT 2026
redstar wrote:
I try to partly address this comment in the source:
```
// FIXME: some of these might be used with constant operands. This will result
// in constant materialization instructions that may be redundant. We currently
// clean this up in PPCMIPeephole with calls to
// PPCInstrInfo::convertToImmediateForm() but we should probably not emit them
// in the first place.
```
It is only a limited implementation as PoC. There are a couple of remarks:
- `atomic_load_and` uses `andi.` because there is no `andi`. Does this have performance implications?
- I see no `nandi`, so this is not matched.
- `addi` uses a different register class for the destination register, therefore not yet matched.
- the missing operations (except `nand`) require signed immediates.
https://github.com/llvm/llvm-project/pull/200432
More information about the llvm-commits
mailing list