[PATCH] D144445: [AggressiveInstCombine] folding load for constant global patterened arrays and structs by alignment
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 22 04:09:13 PDT 2023
nikic added inline comments.
================
Comment at: llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp:860
+ } else if (!isa<GEPOperator>(PtrOp))
+ return false;
+
----------------
These isa checks aren't needed in this patch: For the alignment case, we don't care what the operand is.
================
Comment at: llvm/test/Transforms/AggressiveInstCombine/patterned-load.ll:86
ret i32 %2
}
----------------
I don't get how this one folds with just this patch. If align 1 we have stride 1, but constarray1 needs a stride of 2, no?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144445/new/
https://reviews.llvm.org/D144445
More information about the llvm-commits
mailing list