[llvm] [LoopVectorize] Peek through bitcasts when performing CSE (PR #146856)
Ramkumar Ramachandra via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 2 12:53:12 PDT 2025
================
@@ -2643,7 +2643,8 @@ namespace {
struct CSEDenseMapInfo {
static bool canHandle(const Instruction *I) {
return isa<InsertElementInst>(I) || isa<ExtractElementInst>(I) ||
- isa<ShuffleVectorInst>(I) || isa<GetElementPtrInst>(I);
+ isa<ShuffleVectorInst>(I) || isa<GetElementPtrInst>(I) ||
+ isa<BitCastInst>(I);
----------------
artagnon wrote:
```suggestion
isa<ShuffleVectorInst, GetElementPtrInst, BitCastInst>(I);
```
https://github.com/llvm/llvm-project/pull/146856
More information about the llvm-commits
mailing list