Skip to content

Don't perform final simplification of unstable unfoldings

In #20364 @AndreasK noted one of the unfortunate consequences of our willingness to simplify unstable unfoldings: wrappers, which inline during the final phase, are inlined. As noted by #20364, this may break rules.

@mpickering pointed out an easy way to avoid this: don't perform final-phase simplifications on unstable unfoldings. In principle this makes sense: in the case of an unfolding the "final" phase of simplifications are not the final simplifications that the expression will see; further simplification will occur after the unfolding is inlined into an occurrence site.

Edited by Ben Gamari
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information