Skip to content
Commit 75db0027 authored by Nikita Popov's avatar Nikita Popov
Browse files

[ConstantFold] Remove another incorrect icmp of GEP fold

This fold is not correct, because indices might evaluate to zero
even if they are not a literal zero integer. Additionally, this
fold would be wrong (in the general case) for non-i8 types as well,
due to index overflow.

Drop this fold and instead let the target-dependent constant
folder compute the actual offset and fold the comparison based
on that.
parent aefab6f8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment