[llvm] 6cb2a02 - [Hexagon] Report if changes were made in HvxIdioms pass

Krzysztof Parzyszek via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 14 15:46:51 PDT 2022


Author: Krzysztof Parzyszek
Date: 2022-10-14T15:46:33-07:00
New Revision: 6cb2a02a384aece45e35d6e92bdfd3d52785492f

URL: https://github.com/llvm/llvm-project/commit/6cb2a02a384aece45e35d6e92bdfd3d52785492f
DIFF: https://github.com/llvm/llvm-project/commit/6cb2a02a384aece45e35d6e92bdfd3d52785492f.diff

LOG: [Hexagon] Report if changes were made in HvxIdioms pass

This should fix
```
Pass modifies its input and doesn't report it: Hexagon Vector Combine
Pass modifies its input and doesn't report it UNREACHABLE executed at
[...hecks-debian/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1436!
```

Added: 
    

Modified: 
    llvm/lib/Target/Hexagon/HexagonVectorCombine.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/Hexagon/HexagonVectorCombine.cpp b/llvm/lib/Target/Hexagon/HexagonVectorCombine.cpp
index 4e16d4f8b7ae..2dacfa3783f9 100644
--- a/llvm/lib/Target/Hexagon/HexagonVectorCombine.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonVectorCombine.cpp
@@ -1342,6 +1342,7 @@ auto HvxIdioms::run() -> bool {
         RecursivelyDeleteTriviallyDeadInstructions(&*It, &HVC.TLI);
         It = StartOver ? B.rbegin()
                        : cast<Instruction>(New)->getReverseIterator();
+        Changed = true;
       }
     }
   }


        


More information about the llvm-commits mailing list