diff --git a/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.cpp b/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.cpp --- a/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.cpp +++ b/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.cpp @@ -301,7 +301,7 @@ uint32_t Encoded_pad = Encoded_s_code_end; // Instruction cache line size in bytes. - const unsigned Log2CacheLineSize = 6; + const unsigned Log2CacheLineSize = AMDGPU::isGFX11Plus(STI) ? 7 : 6; const unsigned CacheLineSize = 1u << Log2CacheLineSize; // Extra padding amount in bytes to support prefetch mode 3. @@ -824,7 +824,7 @@ uint32_t Encoded_pad = Encoded_s_code_end; // Instruction cache line size in bytes. - const unsigned Log2CacheLineSize = 6; + const unsigned Log2CacheLineSize = AMDGPU::isGFX11Plus(STI) ? 7 : 6; const unsigned CacheLineSize = 1u << Log2CacheLineSize; // Extra padding amount in bytes to support prefetch mode 3. diff --git a/llvm/test/CodeGen/AMDGPU/s_code_end.ll b/llvm/test/CodeGen/AMDGPU/s_code_end.ll --- a/llvm/test/CodeGen/AMDGPU/s_code_end.ll +++ b/llvm/test/CodeGen/AMDGPU/s_code_end.ll @@ -41,10 +41,10 @@ ; GCN-ASM-NEXT: [[END_LABEL3:\.Lfunc_end.*]]: ; GCN-ASM-NEXT: .size a_function, [[END_LABEL3]]-a_function ; GFX10END-ASM: .p2alignl 6, 3214868480 -; GFX11END-ASM: .p2alignl 6, 3214868480 +; GFX11END-ASM: .p2alignl 7, 3214868480 ; GFX90AEND-ASM: .p2alignl 6, 3212836864 ; GFX10END-ASM-NEXT: .fill 48, 4, 3214868480 -; GFX11END-ASM-NEXT: .fill 48, 4, 3214868480 +; GFX11END-ASM-NEXT: .fill 96, 4, 3214868480 ; GFX90AEND-ASM-NEXT: .fill 256, 4, 3212836864 ; GFX10NOEND-NOT: .fill ; GFX11NOEND-NOT: .fill