[llvm] 977d6cf - [Scalar] Remove a redaundant cast (NFC) (#168284)

via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 16 14:06:15 PST 2025


Author: Kazu Hirata
Date: 2025-11-16T14:06:10-08:00
New Revision: 977d6cfe3ec2027d12415f32d34d53ec0db95218

URL: https://github.com/llvm/llvm-project/commit/977d6cfe3ec2027d12415f32d34d53ec0db95218
DIFF: https://github.com/llvm/llvm-project/commit/977d6cfe3ec2027d12415f32d34d53ec0db95218.diff

LOG: [Scalar] Remove a redaundant cast (NFC) (#168284)

ThisPartition is already of type int.

Identified with readability-redundant-casting.

Added: 
    

Modified: 
    llvm/lib/Transforms/Scalar/LoopDistribute.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Scalar/LoopDistribute.cpp b/llvm/lib/Transforms/Scalar/LoopDistribute.cpp
index 0c8b9043fcbbb..ab292e833852f 100644
--- a/llvm/lib/Transforms/Scalar/LoopDistribute.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopDistribute.cpp
@@ -520,7 +520,7 @@ class InstPartitionContainer {
         // -1 means belonging to multiple partitions.
         else if (Partition == -1)
           break;
-        else if (Partition != (int)ThisPartition)
+        else if (Partition != ThisPartition)
           Partition = -1;
       }
       assert(Partition != -2 && "Pointer not belonging to any partition");


        


More information about the llvm-commits mailing list