[PATCH] D124459: [InstCombine] Combine opaque pointer GEPs with mismatching element types
Arthur Eubanks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 26 11:17:21 PDT 2022
aeubanks added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstructionCombining.cpp:2067
+ if (!Offset.isZero() || (!IsFirstType && !ConstIndices[0].isZero()))
+ return nullptr;
+
----------------
do we want to skip the transform after this if any of this fails?
================
Comment at: llvm/lib/Transforms/InstCombine/InstructionCombining.cpp:2070
+ SmallVector<Value *> Indices;
+ append_range(Indices, drop_end(Src->indices(),
+ Src->getNumIndices() - NumVarIndices));
----------------
I'm surprised we don't have some sort of `first_n`
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D124459/new/
https://reviews.llvm.org/D124459
More information about the llvm-commits
mailing list