[llvm] [LoopInterchange] Remove unnecessary type check (NFC) (PR #202073)

via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 6 12:13:23 PDT 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-llvm-transforms

Author: Ryotaro Kasuga (kasuga-fj)

<details>
<summary>Changes</summary>

As mentioned in #<!-- -->200913, there is an unnecessay type check. Let's remove it.

---
Full diff: https://github.com/llvm/llvm-project/pull/202073.diff


1 Files Affected:

- (modified) llvm/lib/Transforms/Scalar/LoopInterchange.cpp (-2) 


``````````diff
diff --git a/llvm/lib/Transforms/Scalar/LoopInterchange.cpp b/llvm/lib/Transforms/Scalar/LoopInterchange.cpp
index b2e3bbe516ed8..e235249e83475 100644
--- a/llvm/lib/Transforms/Scalar/LoopInterchange.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopInterchange.cpp
@@ -179,8 +179,6 @@ static bool populateDependencyMatrix(CharMatrix &DepMatrix, unsigned Level,
   for (BasicBlock *BB : L->blocks()) {
     // Scan the BB and collect legal loads and stores.
     for (Instruction &I : *BB) {
-      if (!isa<Instruction>(I))
-        return false;
       NumInsts++;
       if (auto *Ld = dyn_cast<LoadInst>(&I)) {
         if (!Ld->isSimple())

``````````

</details>


https://github.com/llvm/llvm-project/pull/202073


More information about the llvm-commits mailing list