[llvm] [X86] Remove LOW32_ADDR_ACCESS_RBP RegisterClass (PR #165018)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 29 11:47:47 PDT 2025
jiang1997 wrote:
This is a brief exploration of how the removal of LOW32_ADDR_ACCESS_RBP affects the following test case. I hope this provides some reference value for others.
#### Test Case
```llvm
; ModuleID = 'abds.ll'
define i128 @abd_subnsw_i128(i128 %a, i128 %b) nounwind {
%sub = sub nsw i128 %a, %b
%abs = call i128 @llvm.abs.i128(i128 %sub, i1 false)
ret i128 %abs
}
declare i128 @llvm.abs.i128(i128, i1 immarg)
```
#### Simply put (and this is as deep as I could dig):
The removal of LOW32_ADDR_ACCESS_RBP causes the MachineScheduler to no longer call `computePSetLimit(LOW32_ADDR_ACCESS_RBP's PressureSet ID)` and instead use `computePSetLimit(LOW32_ADDR_ACCESS's PressureSet ID)`.
Where:
- `computePSetLimit(LOW32_ADDR_ACCESS_RBP's PressureSet ID)` returns 10
- `computePSetLimit(LOW32_ADDR_ACCESS's PressureSet ID)` returns 12
This triggers heuristic calculations, changing the live range of %0 in abd_subnsw_i128 from [528r,608r] to [16r,592r]. Thus, in the new version, %eax is long occupied and can't be allocated earlier.
https://github.com/llvm/llvm-project/pull/165018
More information about the llvm-commits
mailing list