Skip to content
Commit 78f88082 authored by Nikita Popov's avatar Nikita Popov
Browse files

[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.
parent 9c4591d7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment