Skip to content

Commit c56f918

Browse files
committed
Fix a few missed spots
1 parent d0501d3 commit c56f918

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

llvm/lib/IR/Function.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1226,6 +1226,7 @@ bool llvm::CallingConv::supportsNonVoidReturnType(CallingConv::ID CC) {
12261226
case CallingConv::AArch64_SVE_VectorCall:
12271227
case CallingConv::WASM_EmscriptenInvoke:
12281228
case CallingConv::AMDGPU_Gfx:
1229+
case CallingConv::AMDGPU_Gfx_WholeWave:
12291230
case CallingConv::M68k_INTR:
12301231
case CallingConv::AArch64_SME_ABI_Support_Routines_PreserveMost_From_X0:
12311232
case CallingConv::AArch64_SME_ABI_Support_Routines_PreserveMost_From_X2:

llvm/lib/Target/AMDGPU/GCNHazardRecognizer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3155,7 +3155,7 @@ bool GCNHazardRecognizer::fixRequiredExportPriority(MachineInstr *MI) {
31553155
// Check entry priority at each export (as there will only be a few).
31563156
// Note: amdgpu_gfx can only be a callee, so defer to caller setprio.
31573157
bool Changed = false;
3158-
if (CC != CallingConv::AMDGPU_Gfx)
3158+
if (CC != CallingConv::AMDGPU_Gfx && CC != CallingConv::AMDGPU_Gfx_WholeWave)
31593159
Changed = ensureEntrySetPrio(MF, NormalPriority, TII);
31603160

31613161
auto NextMI = std::next(It);

llvm/lib/Target/AMDGPU/SIISelLowering.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2226,7 +2226,8 @@ SDValue SITargetLowering::getPreloadedValue(
22262226
const ArgDescriptor WorkGroupIDZ =
22272227
ArgDescriptor::createRegister(AMDGPU::TTMP7, 0xFFFF0000u);
22282228
if (Subtarget->hasArchitectedSGPRs() &&
2229-
(AMDGPU::isCompute(CC) || CC == CallingConv::AMDGPU_Gfx)) {
2229+
(AMDGPU::isCompute(CC) || CC == CallingConv::AMDGPU_Gfx ||
2230+
CC == CallingConv::AMDGPU_Gfx_WholeWave)) {
22302231
switch (PVID) {
22312232
case AMDGPUFunctionArgInfo::WORKGROUP_ID_X:
22322233
Reg = &WorkGroupIDX;
@@ -2908,7 +2909,8 @@ SDValue SITargetLowering::LowerFormalArguments(
29082909
if (!Subtarget->enableFlatScratch())
29092910
assert(!UserSGPRInfo.hasFlatScratchInit());
29102911
if ((CallConv != CallingConv::AMDGPU_CS &&
2911-
CallConv != CallingConv::AMDGPU_Gfx) ||
2912+
CallConv != CallingConv::AMDGPU_Gfx &&
2913+
CallConv != CallingConv::AMDGPU_Gfx_WholeWave) ||
29122914
!Subtarget->hasArchitectedSGPRs())
29132915
assert(!Info->hasWorkGroupIDX() && !Info->hasWorkGroupIDY() &&
29142916
!Info->hasWorkGroupIDZ());

llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1341,7 +1341,8 @@ constexpr bool isShader(CallingConv::ID CC) {
13411341

13421342
LLVM_READNONE
13431343
constexpr bool isGraphics(CallingConv::ID CC) {
1344-
return isShader(CC) || CC == CallingConv::AMDGPU_Gfx;
1344+
return isShader(CC) || CC == CallingConv::AMDGPU_Gfx ||
1345+
CC == CallingConv::AMDGPU_Gfx_WholeWave;
13451346
}
13461347

13471348
LLVM_READNONE

0 commit comments

Comments
 (0)