Add a flag to getPredicateAt() that allows making use of the block value. This allows us to take into account range information from the current block, rather than only information that is threaded over edges, making the icmp simplification in CVP a lot more useful.
I'm not changing getPredicateAt() to use the block value unconditionally to avoid any impact on the JumpThreading pass, which is somewhat picky about LVI query order.
Most test changes here are just icmps that now get dropped (while previously only a result used in a return was replaced). The two tests in icmp.ll show two representative improvements. Once this lands, I will also clean up CVP tests to drop lots of dummy block splits that had to be added to work around the previous weakness.
Wait, no, please don't do this. Please don't bake in assumption about the semantics of the function based on the type of the argument. If this difference exists, we should fix/remove it.
I've long thought we needed to have a getValueAtBegin(BB) variant. Would that solve your use case?