THIS IS A WORK IN PROGRESS. NOT FOR SUBMISSION.
This pass lowers the is.constant intrinsics into 'true' or 'false'. We
want to convert to 'true' early in the pipeline and 'false' late in the
pipeline. In other words, if right before code generation we cannot
definitively prove that the argument is constant, then we will lower to
'false'.
Fundamentally, we don't have to care too much about the 'true' part. That's handled by normal constant folding well enough already. It's only a fallback for the -O0 pass really.