[PATCH] D68244: [InstCombine] don't assume 'inbounds' for bitcast pointer to GEP transform (PR43501)
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 2 07:39:18 PDT 2019
lebedev.ri added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp:2351
+ DerefBytes >= EltBitWidth / 8)
+ GEP->setIsInBounds();
+ return GEP;
----------------
spatel wrote:
> lebedev.ri wrote:
> > @jdoerfert @uenoku @sstefan1
> > attributor potential missing feature: i'd expect that it could set this `inbounds`, but it does not: https://godbolt.org/z/zkUt1-
> Right...so I proposed this change based on the comments in PR43501, but it raises a question:
> Do we want instcombine doing these limited improvements, or is it better to leave that entire responsibility to Attributor?
Once attributor is enabled and can do this, if it will run frequent-enough in the pipeline,
i'd strongly insist that it should do this.
But currently it does not, so let's keep this for now.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68244/new/
https://reviews.llvm.org/D68244
More information about the llvm-commits
mailing list