[llvm] [Scalar] Remove a redaundant cast (NFC) (PR #168284)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 16 11:13:47 PST 2025
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/168284
ThisPartition is already of type int.
Identified with readability-redundant-casting.
>From 73543ec8a3e0a3fc968ff869c978dfa13b13202d Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Sun, 16 Nov 2025 09:44:28 -0800
Subject: [PATCH] [Scalar] Remove a redaundant cast (NFC)
ThisPartition is already of type int.
Identified with readability-redundant-casting.
---
llvm/lib/Transforms/Scalar/LoopDistribute.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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