[llvm] [Scalar] Remove a redaundant cast (NFC) (PR #168284)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 16 11:14:17 PST 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-transforms
Author: Kazu Hirata (kazutakahirata)
<details>
<summary>Changes</summary>
ThisPartition is already of type int.
Identified with readability-redundant-casting.
---
Full diff: https://github.com/llvm/llvm-project/pull/168284.diff
1 Files Affected:
- (modified) llvm/lib/Transforms/Scalar/LoopDistribute.cpp (+1-1)
``````````diff
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");
``````````
</details>
https://github.com/llvm/llvm-project/pull/168284
More information about the llvm-commits
mailing list