Skip to content
Unverified Commit 24f67473 authored by Roman Lebedev's avatar Roman Lebedev
Browse files

[InstCombine] foldAddWithConstant(): don't deal with non-immediate constants

All of the code that handles general constant here (other than the more
restrictive APInt-dealing code) expects that it is an immediate,
because otherwise we won't actually fold the constants, and increase
instruction count. And it isn't obvious why we'd be okay with
increasing the number of constant expressions,
those still will have to be run..

But after 2829094a
this could also cause endless combine loops.
So actually properly restrict this code to immediates.
parent 48fa06f7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment