[PATCH] D110246: [InstSimplify][InstCombine] Fold ptrtoint(gep i8 null, x) -> x
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 23 03:31:27 PDT 2021
lebedev.ri added inline comments.
================
Comment at: llvm/lib/Analysis/InstructionSimplify.cpp:4682
+ // limited to cases where the result type matches the GEP index type.
+ if (GEP->getNumIndices() == 1 && GEP->getOperand(1)->getType() == Ty) {
+ // We also can't perform the fold if we need a type size multiplier.
----------------
https://godbolt.org/z/hTbv3qqGT
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110246/new/
https://reviews.llvm.org/D110246
More information about the llvm-commits
mailing list