[ConstantHoist] Remove check for notional overindexing
ConstantHoist currently only hoists GEPs if there is no notional overindexing. As this transform only hoists address arithmetic, it shouldn't care about whether any overindexing occurs or not. There is one caveat: If the hoisted base GEP is inbounds, and a later non-inbounds GEP is rewritten in terms of it, the value may be incorrectly poisoned. To avoid this, restrict the transform to inbounds GEPs for now, as the notional overindexing check effectively did that as well. The inbounds restriction could be dropped by dropping inbounds from the base GEP expression. Differential Revision: https://reviews.llvm.org/D117201
Loading
Please sign in to comment