[PATCH] D62025: Expand llvm.is.constant earlier

Joerg Sonnenberger via llvm-commits llvm-commits at lists.llvm.org
Mon May 20 15:57:28 PDT 2019


On Fri, May 17, 2019 at 08:54:35PM +0000, Roman Lebedev via Phabricator wrote:
> 2c:
> Is it guaranteed that this transform (instsimplify) will *ONLY* *EVER* run once at the end of the pipeline?
> *Every* pipeline ever created? That is the 'requirement' on this `@llvm.is.constant` expansion, i believe.
> Would it not be better to not rely on this implicit, undocumented, untested behavior?

The intrinsic will still be lowered in the various SDAG forms. You don't
get the benefit of SimplifyCFG, but then again, if you don't ask for it,
I'm not sure you should.

The patch does test that the instruction doesn't survive.

Joerg


More information about the llvm-commits mailing list