1101 Commits

Author SHA1 Message Date
Lleu Yang
dd30239f33
[AMDGPU] Add basic verification for source modifiers (#186733)
Source modifiers (input modifiers) should always be immediates.
This commit made machine verifier reject non-immediate source modifiers.

Closes #182243
2026-03-20 20:32:30 +01:00
Romanov Vlad
a704195054
[AMDGPU] Shrink S_MOV_B64 to S_MOV_B32 during rematerialization (#184333)
When rematerializing S_MOV_B64 or S_MOV_B64_IMM_PSEUDO and only a single
32-bit lane of the result is used at the remat point, emit S_MOV_B32
with the appropriate half of the 64-bit immediate instead.

This reduces register pressure by defining a 32-bit register instead of
a 64-bit pair when the other half is unused.
2026-03-20 15:09:13 +01:00
Alexis Engelke
a3e3fed088
[CodeGen] Declare MachineCycleInfo in headers (#187494)
Transform MachineCycleInfo into a class that can be declared and remove
include from many source files.

Similar to 810ba55de9159932d498e9387d031f362b93fbea.
2026-03-19 13:32:59 +00:00
Aaditya
fbd2467796
[AMDGPU] DPP implementations for Wave Reduction (#185814)
Adding DPP reduction support for i32 types.
Supported Ops: `umin`, `min`, `umax`, `max`,
`add`, `sub`, `and`, `or`, `xor`.
2026-03-18 13:11:53 +05:30
jundaliuAMD
38eebe843b
[AMDGPU] Add s_sethalt to hasUnwantedEffectsWhenEXECEmpty (#186745)
We don't want to execute s_sethalt when all lanes want to skip it.

Co-authored-by: Junda Liu <Junda.Liu@amd.com>
2026-03-17 10:32:07 +08:00
Brox Chen
4456f31a8f
[AMDGPU][True16] Use COPY instead of V_MOV for non-imm operand in movePackToVALU lowering (#185754)
We should use COPY here for no-imm operands to reduce the number of
generated mov in the isa. However, there is an issue in
https://github.com/llvm/llvm-project/pull/162389#discussion_r2430459341
here that blocked me from doing it.

With https://github.com/llvm/llvm-project/pull/185751 this should work
now
2026-03-12 17:12:45 -04:00
Mirko Brkušanin
a5aa136eb3
[AMDGPU] Add GFX11_7Insts feature, eliminate isGFX1170 helpers. NFC (#185878) 2026-03-11 17:05:18 +01:00
Chinmay Deshpande
4d49a1e616
[AMDGPU] Move constraining of the reg class during SGPR to VGPR copy to existing loop (#182104) 2026-03-10 11:23:40 -07:00
Mirko Brkušanin
b7a0445565
[AMDGPU][MC] Update old and add new min/max instructions for gfx1170 (#184601) 2026-03-09 18:38:45 +01:00
Aaditya
1d6607d5ef
[AMDGPU] Remove alignment constraint from spill pseudos (#177317)
Spill pseudo opcodes don't require target reg class alignment
constraint.
For targets which do have alignment constraints, lower the spills to
32-bit accesses.
Update the machine verifier accordingly.
Sgpr spill pseudos didn't enforce alignment constraints.
Modify vgpr spills reg class to not enforce them either.
2026-03-09 09:33:23 +05:30
Changpeng Fang
5b144c0aec
[AMDGPU] Add suffix _d4 to tensor load/store with 4 groups D#, NFC (#184176)
Rename TENSOR_LOAD_TO_LDS to TENSOR_LOAD_TO_LDS_d4;
  Rename TENSOR_STORE_FROM_LDS to TENSOR_STORE_FROM_LDS_d4;
Also rename function names in a couple of tests to reflect this change.
2026-03-03 14:10:38 -08:00
Nicolai Hähnle
572a0e45c6
AMDGPU: Remove "MBUF" from "loadMBUFScalarOperandsFromVGPR" (#184282)
There is nothing MBUF-specific about this function.
2026-03-03 02:42:08 +00:00
Jay Foad
52df4a1959 [AMDGPU] Fix typos "SPGR" / "VPGR" in comments 2026-03-02 11:48:38 +00:00
Dark Steve
254cb2a326
[AMDGPU] Hoist WMMA coexecution hazard V_NOPs from loops to preheaders (#176895)
On GFX1250, V_NOPs inserted for WMMA coexecution hazards are placed at
the use-site. When the hazard-consuming instruction is inside a loop and
the WMMA is outside, these NOPs execute every iteration even though the
hazard only needs to be covered once.

This patch hoists the V_NOPs to the loop preheader, reducing executions
from N iterations to 1.

```
Example (assuming a hazard requiring K V_NOPs):
  Before:
    bb.0 (preheader): WMMA writes vgpr0
    bb.1 (loop):      V_NOP xK, VALU reads vgpr0, branch bb.1
                      -> K NOPs executed per iteration

  After:
    bb.0 (preheader): WMMA writes vgpr0, V_NOP xK
    bb.1 (loop):      VALU reads vgpr0, branch bb.1
                      -> K NOPs executed once
```

For nested loops, V_NOPs are hoisted to the outermost preheader where no
WMMA hazard exists within the loop.
Hoisting is restricted to strict preheaders (not any single predecessor)
to avoid introducing V_NOPs on unrelated control flow paths.

The optimization is controlled by `-amdgpu-wmma-vnop-hoisting` (default:
on).

Fixes: SWDEV-573407
2026-02-26 17:19:00 +05:30
zGoldthorpe
20dba979f7
[AMDGPU] Add target features to guard DPP controls (#182391)
This patch adds target features:
- `+dpp-wavefront-shifts`, for DPP `wave_shl/rol/shr/ror`
- `+dpp-row-bcast`, for DPP `row_bcast15/31`

These DPP controls are not available in gfx10+, so these target features
enable `AMDGPURemoveIncompatibleFunctions` to remove functions that rely
on these controls when compiling for newer GPUs.
2026-02-20 07:59:10 -07:00
Jay Foad
27144f4c2e
[TableGen] Return int32_t from InstrMapping table lookup functions. NFC. (#182079)
Since #182059 there is only one case in which these functions return -1,
so callers no longer need to distinguish between (int64_t)-1 and
(uint32_t)-1, so we can go back to a 32-bit return value like it was
before #180954.
2026-02-18 18:49:58 +00:00
Jay Foad
5a8266d7a8
[TableGen] Use INSTRUCTION_LIST_END as a sentinel in InstrMapping tables (#182059)
Use INSTRUCTION_LIST_END instead of (uint32_t)-1 to indicate absence of
an entry in an InstrMapping table. This is more verbose in the generated
table but it is the canonical invalid opcode value and it avoids
confusion with the case where the generated map function returns
(uint64_t)-1 if the initial table row lookup fails.
2026-02-18 17:37:31 +00:00
Chinmay Deshpande
e0b3e82e98
[AMDGPU] Constrain register class during COPY elimination based on their uses (#181909)
When a WMMA scale operand (requiring `VCSrc_b32_Lo256`) was an SGPR that
had been copied from a VGPR, the COPY elimination replaced all uses of
the SGPR with the VGPR but failed to constrain the VGPR to
`vgpr_32_lo256`. This allowed the register allocator to assign a VGPR >=
256 (e.g., $vgpr309), violating the hardware encoding requirement.
2026-02-17 13:47:54 -08:00
sstipano
5ec5701db3
Reapply "[MC][TableGen] Expand Opcode field of MCInstrDesc" (#180321) (#180954)
Difference from the previous version is that this one doesn't actually
encode opcodes in matcher tables as 32 bits, but still as 16 bits.
2026-02-12 09:17:02 +01:00
Stanislav Mekhanoshin
1a9c61f004
[AMDGPU] Non convergent instruction does not depend on EXEC. NFCI. (#179821) 2026-02-09 23:24:45 -08:00
Shilei Tian
65b4099219
[AMDGPU] Fix instruction size for 64-bit literal constant operands (#180387)
`getLit64Encoding` uses a different approach to determine whether 64-bit
literal encoding is used, which caused a size mismatch between the
`MachineInstr` and the `MCInst`.

For `!isValid32BitLiteral`, it is effectively `!(isInt<32>(Val) ||
isUInt<32>(Val))`, which is `!isInt<32>(Val) && !isUInt<32>(Val)`, but
in `getLit64Encoding`, it is `!isInt<32>(Val) || !isUInt<32>(Val)`.
2026-02-09 14:31:52 +00:00
Petr Kurapov
27a8ab09fa
[AMDGPU] Fix V_INDIRECT_REG_READ_GPR_IDX expansion with immediate index (#179699)
The definition for V_INDIRECT_REG_READ_GPR_IDX_B32_V*'s SSrc_b32 operand
allows immediates, but the expansion logic handles only register cases
now. This can result in expansion failures when e.g.
llvm.amdgcn.wave.reduce.umin.i32 is folded into a constant and then used
as an insertelement idx.
2026-02-09 11:33:30 +01:00
Vladimir Vereschaka
19d681177f
Revert "[MC][TableGen] Expand Opcode field of MCInstrDesc" (#180321)
Reverts llvm/llvm-project#179652

This PR causes the out-of-memory build failures on many Windows
builders.
2026-02-06 21:58:50 -08:00
sstipano
13d8870d45
[MC][TableGen] Expand Opcode field of MCInstrDesc (#179652)
Increase width of Opcode to `int` from `short` to allow more capacity.
2026-02-06 20:21:48 +01:00
Pierre van Houtryve
b738491d2f
[AMDGPU][GFX12.5] Add support for emitting memory operations with nv bit set (#179413)
- Add `MONonVolatile` MachineMemOperand flag.
- Set nv=1 on memory operations on GFX12.5 if the operation accesses a
constant address space,
  is an invariant load, or has the `MONonVolatile` flag set.
2026-02-06 11:35:46 +01:00
Diana Picus
9022f47ca4
[AMDGPU] Implement llvm.sponentry (#176357)
In some of our use cases, the GPU runtime stores some data at the top of
the stack. It figures out where it's safe to store it by using the PAL
metadata generated by the backend, which includes the total stack size.
However, the metadata does not include the space reserved at the bottom
of the stack for the trap handler when CWSR is enabled in dynamic VGPR
mode. This space is reserved dynamically based on whether or not the
code is running on the compute queue. Therefore, the runtime needs a way
to take that into account.

Add support for `llvm.sponentry`, which should return the base of the
stack,
skipping over any reserved areas. This allows us to keep this
computation in
one place rather than duplicate it between the backend and the runtime.

The implementation for functions that set up their own stack uses a
pseudo
that is expanded to the same code sequence as that used in the prolog to
set up the stack in the first place.

In callable functions, we generate a fixed stack object and use that
instead,
similar to the Arm/AArch64 approach. This wastes some stack space but
that's
not a problem for now because we're not planning to use this in callable
functions yet.
2026-02-03 15:02:07 +01:00
vporpo
1658456ccf
[AMDGPU] Introduce custom MIR formatting for s_wait_alu (#176316)
This patch implements a custom printer/parser for the immediate operand
of s_wait_alu that prints/parses the decoded counter values.

Format:
```
 .<counter1>_<value1>_<counter2>_<value2>
```

Example:
 `s_wait_alu .VaVdst_1_VmVsrc_1`
 ; Which is equivalent to this:
 `s_wait_alu 8167`

Features:
- If a counter is at its maximum value it won't get printed.
- The parser will error out if a counter is greater or equal to its max
value.
- If all counters are disabled we can use 'AllOff'.
- For now we also accept numeric values for backwards compatibility with
older MIR.

Note: This is similar to https://github.com/llvm/llvm-project/pull/96004
but for `s_wait_alu`.
2026-01-31 10:46:59 -08:00
Janek van Oirschot
d1e2ddf997
[AMDGPU] Emit b32 movs if (a)v_mov_b64_pseudo dest vgprs are misaligned (#160547)
#154115 Exposed a possible destination misaligned v_mov_b64

Relaxes v_mov_b64_pseudo register class constraint (which matches
av_mov_b64_pseudo's register class).
2026-01-30 15:01:14 +00:00
Jay Foad
dbd4240130
[AMDGPU] Fix DEALLOC_VGPRS in the presence of spills to scratch (#178461) 2026-01-29 20:57:16 +01:00
Jay Foad
3f1386b986
[AMDGPU] Add braces around a switch case. NFC. (#178637) 2026-01-29 12:10:03 +00:00
vporpo
21dad8e5cc
[AMDGPU] Improve crash message when S_WAITCNT_DEPCTR is missing its operand (#177065)
The code in the test is causing a crash in `SIInstrInfo.cpp`
`fixImplicitOperands()` in `MI.implicit_operands()`:
```
  for (auto &Op : MI.implicit_operands()) {
```
MachineInstr.h:
```
  mop_range implicit_operands() {
=>  return operands_impl().drop_front(getNumExplicitOperands());
  }
```
We are trying to drop 1 operand from the operands of MI which are 0.

By early returning we are no longer crashing at that point and we are
getting a more meaningful error message:

```
*** Bad machine code: Too few operands ***
- function:    missing_operand_crash
- basic block: %bb.0  (0x5a9d30ced988)
- instruction: S_WAITCNT_DEPCTR
1 operands expected, but 0 given.
```

The code is still crashing at a different location, but at least we are
getting an error message.
2026-01-26 08:35:30 -08:00
Jay Foad
017f2bc181
[AMDGPU] Simplify legalization of PHI operands (#177352)
In practice when legalizeOperands is called on a PHI node, the result is
never an SGPR class and the operands are never subregs. Simplify the
code accordingly by using the result regclass for all the inputs. This
includes using an AV class where previously we picked either an AGPR or
VGPR class.
2026-01-26 15:39:13 +00:00
Mariusz Sikora
3c0f5045e1
[AMDGPU] Add FeatureGFX13 and SMEM encoding for gfx13 (#177567)
For now list of features is based on gfx12 and gfx1250

---------

Co-authored-by: Jay Foad <jay.foad@amd.com>
2026-01-26 14:16:36 +01:00
Ryan Mitchell
13b20e7aea
[AMDGPU][SILoadStoreOptimizer] Fix lds address operand offset (#176816)
The offset operand in GLOBAL_LOAD_ASYNC_TO_LDS_B128, for instance, is
added to both the lds and global address, but SILoadStoreOptimizer is
currently unaware of that. This PR inserts an add to counteract the
offset meant for the global address. This one add is better than not
doing the optimization at all, and having to insert 2 adds for each
global address calculation (with no offset).

```
; ENABLE-LABEL: name: promote_async_load_offset
; ENABLE: liveins: $ttmp7, $vgpr0, $sgpr0_sgpr1
; ENABLE-NEXT: {{  $}}
; ENABLE-NEXT: renamable $vgpr1 = V_LSHLREV_B32_e32 8, $vgpr0, implicit $exec
; ENABLE-NEXT: renamable $vgpr2, renamable $vcc_lo = V_ADD_CO_U32_e64 $vgpr0, 512, 0, implicit $exec
; ENABLE-NEXT: renamable $vgpr3, dead $sgpr_null = V_ADDC_U32_e64 0, killed $vgpr0, killed $vcc_lo, 0, implicit $exec
; ENABLE-NEXT: renamable $vgpr1 = disjoint V_OR_B32_e32 0, killed $vgpr1, implicit $exec
; ENABLE-NEXT: renamable $vgpr0 = V_ADD_U32_e32 256, $vgpr1, implicit $exec
; ENABLE-NEXT: GLOBAL_LOAD_ASYNC_TO_LDS_B128 killed $vgpr0, $vgpr2_vgpr3, -256, 0, implicit-def $asynccnt, implicit $exec, implicit $asynccnt :: (load store (s128), align 1, addrspace 3)
; ENABLE-NEXT: GLOBAL_LOAD_ASYNC_TO_LDS_B128 killed $vgpr1, killed $vgpr2_vgpr3, 0, 0, implicit-def $asynccnt, implicit $exec, implicit $asynccnt :: (load store (s128), align 1, addrspace 3)

; DISABLE-LABEL: name: promote_async_load_offset
; DISABLE: liveins: $ttmp7, $vgpr0, $sgpr0_sgpr1
; DISABLE-NEXT: {{  $}}
; DISABLE-NEXT: renamable $vgpr1 = V_LSHLREV_B32_e32 8, $vgpr0, implicit $exec
; DISABLE-NEXT: renamable $vgpr2, renamable $vcc_lo = V_ADD_CO_U32_e64 256, $vgpr0, 0, implicit $exec
; DISABLE-NEXT: renamable $vgpr3, $sgpr_null = V_ADDC_U32_e64 0, $vgpr0, killed $vcc_lo, 0, implicit $exec
; DISABLE-NEXT: renamable $vgpr1 = disjoint V_OR_B32_e32 0, killed $vgpr1, implicit $exec
; DISABLE-NEXT: GLOBAL_LOAD_ASYNC_TO_LDS_B128 $vgpr1, killed $vgpr2_vgpr3, 0, 0, implicit-def $asynccnt, implicit $exec, implicit $asynccnt :: (load store (s128), align 1, addrspace 3)
; DISABLE-NEXT: renamable $vgpr2, renamable $vcc_lo = V_ADD_CO_U32_e64 512, $vgpr0, 0, implicit $exec
; DISABLE-NEXT: renamable $vgpr3, $sgpr_null = V_ADDC_U32_e64 0, killed $vgpr0, killed $vcc_lo, 0, implicit $exec
; DISABLE-NEXT: GLOBAL_LOAD_ASYNC_TO_LDS_B128 killed $vgpr1, killed $vgpr2_vgpr3, 0, 0, implicit-def $asynccnt, implicit $exec, implicit $asynccnt :: (load store (s128), align 1, addrspace 3)
```

This PR also promotes the global address to an offset when the offset is
calculated with V_ADD_U64 on applicable gfx versions, (and inversely
adds the LDS offset), whereas previously the optimization opportunity
was missed entirely.
2026-01-26 09:23:17 +01:00
LU-JOHN
8d55fa2853
[AMDGPU] Remove redundant s_cmp_* after add X, 1 (#176962)
Convert:

```
s_add_u32 X, Y, 1
s_cmp_lg_i32 X, 0

```
to:

```
s_add_u32 X, Y, 1
<invert scc uses>
```
Also delete with s_cmp_eq_i32 X, 0, but inverting scc uses is not
necessary.

---------

Signed-off-by: John Lu <John.Lu@amd.com>
2026-01-23 07:51:36 -06:00
Sam Elliott
7184229fea
[NFC][MI] Tidy Up RegState enum use (2/2) (#177090)
This Change makes `RegState` into an enum class, with bitwise operators.
It also:
- Updates declarations of flag variables/arguments/returns from
`unsigned` to `RegState`.
- Updates empty RegState initializers from 0 to `{}`.

If this is causing problems in downstream code:
- Adopt the `RegState getXXXRegState(bool)` functions instead of using a
ternary operator such as `bool ? RegState::XXX : 0`.
- Adopt the `bool hasRegState(RegState, RegState)` function instead of
using a bitwise check of the flags.
2026-01-23 00:19:03 -08:00
Shilei Tian
02d34a76f7
[NFCI][AMDGPU] Remove more redundant code from GCNSubtarget.h (#177297)
We are getting pretty close to use `GET_SUBTARGETINFO_MACRO` in the
header with this cleanup.
2026-01-22 09:07:15 -05:00
Dark Steve
9429a1e809
[AMDGPU] Fix insertSimulatedTrap to return correct continuation block (#174774)
`insertSimulatedTrap` was returning `HaltLoopBB` when the trap was in a
block with no successors and was the last instruction. Since
`HaltLoopBB` gets appended to the end of the function, `FinalizeISel`
would jump there and skip any intermediate blocks, leaving their pseudos
unexpanded.

Fix by returning `MBB.getNextNode()` unconditionally:
- After `splitAt()`: `getNextNode()` returns the split-off block
(`ContBB`)
- No split, `MBB` in middle: `getNextNode()` returns the next original
block
- No split, `MBB` was last: `getNextNode()` returns `HaltLoopBB` (just
pushed)

Since we always `push_back(HaltLoopBB)` before returning,
`getNextNode()` can never be `nullptr`: if `MBB` was the last block,
`HaltLoopBB` is now after it.

Fixes: SWDEV-572407
2026-01-21 11:52:38 +05:30
Shilei Tian
c253b9f9ca
[AMDGPU] Fix inline constant encoding for v_pk_fmac_f16 (#176659)
This PR handles`v_pk_fmac_f16` inline constant encoding/decoding
differences between pre-GFX11 and GFX11+ hardware.

- Pre-GFX11: fp16 inline constants produce `(f16, 0)` - value in low 16
bits, zero in high.
- GFX11+: fp16 inline constants are duplicated to both halves `(f16,
f16)`.

Fixes #94116.
2026-01-20 19:14:59 -05:00
Stanislav Mekhanoshin
0f739e7581
[AMDGPU] Use lambda in fmaak/fmamk f16 folding. NFC (#176258) 2026-01-16 16:01:52 -08:00
Sam Elliott
2042887709
Reland "[NFC][MI] Tidy Up RegState enum use (1/2)" (#176277)
This Change is to prepare to make RegState into an enum class. It:
- Updates documentation to match the order in the code.
- Brings the `get<>RegState` functions together and makes them
`constexpr`.
- Adopts the `get<>RegState` where RegStates were being chosen with
ternary operators in backend code.
- Introduces `hasRegState` to make querying RegState easier once it is
an enum class.
- Adopts `hasRegState` where equivalent was done with bitwise
arithmetic.
- Introduces `RegState::NoFlags`, which will be used for the lack of
flags.
- Documents that `0x1` is a reserved flag value used to detect if
someone is passing `true` instead of flags (due to implicit bool to
unsigned conversions).
- Updates two calls to `MachineInstrBuilder::addReg` which were passing
`false` to the flags operand, to no longer pass a value.
- Documents that `getRegState` seems to have forgotten a call to
`getEarlyClobberRegState`.

This PR relands llvm/llvm-project#176091 (commit
1d616cdca3aba9d22f120888bb6b09b75ca90b92) which was reverted in
llvm/llvm-project#176190 (commit
6309cd8668fc2ae589f156b23f86821f4ce5b7ea).
2026-01-16 13:05:06 -08:00
Stanislav Mekhanoshin
b501f666c5
[AMDGPU] Fix expensive checks in fmaak/fmamk f16 folding (#176238)
Register classes of sources also has to be restrained to lo128.
There are few regression with register coalescing in true16 mode
though, but otherwise it fails verification.
2026-01-15 14:03:07 -08:00
Stanislav Mekhanoshin
5546ce99d8
[AMDGPU] Allow 16-bit imm folding in real true16 (#173318) 2026-01-15 11:15:12 -08:00
Stanislav Mekhanoshin
fa3ef64011
[AMDGPU] Create V_FMAAK_F16/V_FMAMK_F16 in true16 with imm folding (#173317)
This does not cover real true16 with tests, the next patch will.
2026-01-15 11:06:34 -08:00
Sam Elliott
6309cd8668
Revert "[NFC][MI] Tidy Up RegState enum use (1/2)" (#176190)
Reverts llvm/llvm-project#176091

Reverting because some compilers were erroring on the call to
`Reg.isReg()` (which is not `constexpr`) in a `constexpr` function.
2026-01-15 07:58:05 -08:00
Sam Elliott
1d616cdca3
[NFC][MI] Tidy Up RegState enum use (1/2) (#176091)
This Change is to prepare to make RegState into an enum class. It:
- Updates documentation to match the order in the code.
- Brings the `get<>RegState` functions together and makes them
`constexpr`.
- Adopts the `get<>RegState` where RegStates were being chosen with
ternary operators in backend code.
- Introduces `hasRegState` to make querying RegState easier once it is
an enum class.
- Adopts `hasRegState` where equivalent was done with bitwise
arithmetic.
- Introduces `RegState::NoFlags`, which will be used for the lack of
flags.
- Documents that `0x1` is a reserved flag value used to detect if
someone is passing `true` instead of flags (due to implicit bool to
unsigned conversions).
- Updates two calls to `MachineInstrBuilder::addReg` which were passing
`false` to the flags operand, to no longer pass a value.
- Documents that `getRegState` seems to have forgotten a call to
`getEarlyClobberRegState`.
2026-01-15 07:47:05 -08:00
sstipano
cc1e10d50b
[AMDGPU] Disable s_add_pc_i64 instruction (#175644)
s_add_pc_i64 instruction is broken on gfx1250. Disable it by default.
2026-01-14 23:01:43 +01:00
LU-JOHN
cf237465b3
[AMDGPU] Invert scc uses to delete s_cmp_eq* (#167382)
Delete s_cmp_eq* instructions by inverting instructions that use scc.

---------

Signed-off-by: John Lu <John.Lu@amd.com>
2026-01-14 10:24:24 -06:00
Christudasan Devadasan
9e1606026c
[CodeGen][InlineSpiller] Add SubReg argument to loadRegFromStackSlot for subreg-reload (#175581)
This preparatory patch introduces an additional argument to the target hook
loadRegFromStackSlot. Ths is essential for targets to handle subregister-specific
reload in the future. See how this is used for AMDGPU target with PR #175002.
2026-01-13 08:21:58 +05:30
Christudasan Devadasan
e486a26b9c
[AMDGPU] Add liverange split instructions into BB Prolog (#117544)
The COPY inserted for liverange split during sgpr-regalloc
pipeline currently breaks the BB prolog during the subsequent
vgpr-regalloc phase while spilling and/or splitting the vector
liveranges. This patch fixes it by correctly including the
LR split instructions during sgpr-regalloc and wwm-regalloc
pipelines into the BB prolog.
2026-01-09 21:25:14 +05:30