Hi,
In running opt -indvars on the attached file, I see a massive constant expression being generated (I stop opt once the output file grows larger than 3GB). The example comes from a reduced version an LNT test. I’ve been looking into constant folding and indvar simplify to see if there’s a way to limit the depth of these expressions, but I haven’t figured anything out.
Could anyone shine some light into how to handle these expressions? Could they be broken into multiple values? Or can we limit the complexity of constant exprs?
Thanks,
sam
constant-folding.ll (1.25 KB)