[llvm] 5672a87 - [CodeGen] Remove an unnecessary cast (NFC) (#151280)

via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 30 07:30:08 PDT 2025


Author: Kazu Hirata
Date: 2025-07-30T07:30:05-07:00
New Revision: 5672a8723f98ac531644ae3f8fe182d11d781cb1

URL: https://github.com/llvm/llvm-project/commit/5672a8723f98ac531644ae3f8fe182d11d781cb1
DIFF: https://github.com/llvm/llvm-project/commit/5672a8723f98ac531644ae3f8fe182d11d781cb1.diff

LOG: [CodeGen] Remove an unnecessary cast (NFC) (#151280)

LoopValStage is already of int.

Added: 
    

Modified: 
    llvm/lib/CodeGen/ModuloSchedule.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/ModuloSchedule.cpp b/llvm/lib/CodeGen/ModuloSchedule.cpp
index 0f742c46fd1b3..21bf052d1fdaf 100644
--- a/llvm/lib/CodeGen/ModuloSchedule.cpp
+++ b/llvm/lib/CodeGen/ModuloSchedule.cpp
@@ -423,7 +423,7 @@ void ModuloScheduleExpander::generateExistingPhis(
     // potentially define two values.
     unsigned MaxPhis = PrologStage + 2;
     if (!InKernel && (int)PrologStage <= LoopValStage)
-      MaxPhis = std::max((int)MaxPhis - (int)LoopValStage, 1);
+      MaxPhis = std::max((int)MaxPhis - LoopValStage, 1);
     unsigned NumPhis = std::min(NumStages, MaxPhis);
 
     Register NewReg;


        


More information about the llvm-commits mailing list