-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve value numbering for casts (#59841)
* Refactor how casts are VNed, part 1 Remove duplication between VNPairForCast and VNForCast, route the former through the latter. Also change the debug output for casts. No diffs for this commit. * Refactor how casts are VNed, part 2 VN cast helpers just like casts. This allows them to be folded. In the past, this was dangerous because some of the pessimization protected us from undefined behavior in cases of out-of-bounds conversions, but now we do not fold such cases anymore. * Enable VN-based constant propagation for calls This solves some of the regressions seen due to now-missing CSEs of these helper calls evaluated as constants by VN. * Fix VNFuncs for MUL_OVF helpers This fixes the test failures revealed by the more aggressive constant propagation. This is very similar to a bug that was recently fixed where checked casts were treated as non-checked and could be observed without the assertion propagation changes as well, with the redundant branches optimization.
- Loading branch information
1 parent
f40247e
commit 7ecced4
Showing
6 changed files
with
213 additions
and
143 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.