[PATCH] D105467: [AMDGPU] Mark waterfall loops as SI_WATERFALL_LOOP
    Jay Foad via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Tue Jul  6 03:01:01 PDT 2021
    
    
  
foad added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/SILowerControlFlow.cpp:426
+
+  MachineInstr *Branch =
+      BuildMI(MBB, MI, DL, TII->get(AMDGPU::S_CBRANCH_EXECNZ))
----------------
Can you use MachineInstr::setDesc to mutate MI into an S_CBRANCH_EXECNZ, instead of creating a new instruction and erasing the old one?
================
Comment at: llvm/lib/Target/AMDGPU/SILowerI1Copies.cpp:174
             MI.getOpcode() == AMDGPU::SI_ELSE ||
+            MI.getOpcode() == AMDGPU::SI_WATERFALL_LOOP ||
             MI.getOpcode() == AMDGPU::SI_LOOP) {
----------------
Is this a change in behaviour? Previously we used an S_CBRANCH_EXECNZ which would not set Divergent here.
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D105467/new/
https://reviews.llvm.org/D105467
    
    
More information about the llvm-commits
mailing list