[PATCH] D154228: [GVN] Use vector ops when doing loadCoercion on a vector value
Manuel Brito via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 1 10:05:43 PDT 2023
ManuelJBrito added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/VNCoercion.cpp:316
Builder.CreatePtrToInt(SrcVal, DL.getIntPtrType(SrcVal->getType()));
+ else if (SrcVal->getType()->isVectorTy()) {
+ // If they have the same size let coerceAvailableValueToLoadType handle it.
----------------
foad wrote:
> Do you also need to do this for the vector-of-pointers case that is handled above?
Yes, the vector-of-pointers should be converted to a vector-of-ints and then the rest of the logic would work fine for that case.
The problem is that AFAICT we can't just bitcast it to a vector-of-ints of the correct size.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D154228/new/
https://reviews.llvm.org/D154228
More information about the llvm-commits
mailing list