[llvm] 4a577c3 - [AMDGPU] Fix incorrect arch assert while setting up FlatScratchInit

via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 24 11:19:20 PDT 2020


Author: madhur13490
Date: 2020-07-24T18:19:04Z
New Revision: 4a577c3a22c4ae388adca821a91552296e0d2653

URL: https://github.com/llvm/llvm-project/commit/4a577c3a22c4ae388adca821a91552296e0d2653
DIFF: https://github.com/llvm/llvm-project/commit/4a577c3a22c4ae388adca821a91552296e0d2653.diff

LOG: [AMDGPU] Fix incorrect arch assert while setting up FlatScratchInit

Reviewers: arsenm, foad, rampitec, scott.linder

Reviewed By: arsenm

Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, kerbowa, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D84391

Added: 
    

Modified: 
    llvm/lib/Target/AMDGPU/SIFrameLowering.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/AMDGPU/SIFrameLowering.cpp b/llvm/lib/Target/AMDGPU/SIFrameLowering.cpp
index a2e802009d09..a5b04570655a 100644
--- a/llvm/lib/Target/AMDGPU/SIFrameLowering.cpp
+++ b/llvm/lib/Target/AMDGPU/SIFrameLowering.cpp
@@ -274,6 +274,7 @@ void SIFrameLowering::emitEntryFunctionFlatScratchInit(
       return;
     }
 
+    // For GFX9.
     BuildMI(MBB, I, DL, TII->get(AMDGPU::S_ADD_U32), AMDGPU::FLAT_SCR_LO)
       .addReg(FlatScrInitLo)
       .addReg(ScratchWaveOffsetReg);
@@ -284,7 +285,7 @@ void SIFrameLowering::emitEntryFunctionFlatScratchInit(
     return;
   }
 
-  assert(ST.getGeneration() < AMDGPUSubtarget::GFX10);
+  assert(ST.getGeneration() < AMDGPUSubtarget::GFX9);
 
   // Copy the size in bytes.
   BuildMI(MBB, I, DL, TII->get(AMDGPU::COPY), AMDGPU::FLAT_SCR_LO)


        


More information about the llvm-commits mailing list