[llvm] 659ce8f - AMDGPU: Simplify else if to else in GCNHazardRecognizer

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 29 18:47:25 PST 2024


Author: Matt Arsenault
Date: 2024-01-30T08:17:04+05:30
New Revision: 659ce8f66597ba19845e407d06156ff33c8c7fb1

URL: https://github.com/llvm/llvm-project/commit/659ce8f66597ba19845e407d06156ff33c8c7fb1
DIFF: https://github.com/llvm/llvm-project/commit/659ce8f66597ba19845e407d06156ff33c8c7fb1.diff

LOG: AMDGPU: Simplify else if to else in GCNHazardRecognizer

Fixes #79736

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/AMDGPU/GCNHazardRecognizer.cpp b/llvm/lib/Target/AMDGPU/GCNHazardRecognizer.cpp
index 1c013cc25b296..a727134b53dec 100644
--- a/llvm/lib/Target/AMDGPU/GCNHazardRecognizer.cpp
+++ b/llvm/lib/Target/AMDGPU/GCNHazardRecognizer.cpp
@@ -1584,7 +1584,7 @@ bool GCNHazardRecognizer::fixVALUPartialForwardingHazard(MachineInstr *MI) {
       if (DefVALUs != std::numeric_limits<int>::max()) {
         if (DefVALUs >= State.ExecPos)
           PreExecPos = std::min(PreExecPos, DefVALUs);
-        else if (DefVALUs < State.ExecPos)
+        else
           PostExecPos = std::min(PostExecPos, DefVALUs);
       }
     }


        


More information about the llvm-commits mailing list