[ConstantFold] Fix incorrect inbounds inference for [0 x T] GEPs
Previously all indices into [0 x T] arrays were considered in range, which resulted in us incorrectly inferring inbounds for all GEPs of that form. We should not consider them in range here, and instead bail out of the rewriting logic (which would divide by zero). Do continue to consider 0 always in range, to avoid changing behavior for zero-index GEPs.
Loading
Please sign in to comment