Commit 032ac76
committed
Move CVP before instcombine in the pass pipeline
I was investigating why LLVM was unable to remove the boundscheck
that was causing the test failure in #48066
and it turned out that the check was removable by instcombine, but
only if cvp ran first. However, we ran the passes in the opposite
order and then loop-rotated the condition away before instcombine
ran again. I think it makes sense to run cvp before instcombine to
make sure that instcombine can make use of the overflow flags inferred
by cvp. For the particular case in #48066, we also need
https://reviews.llvm.org/D140933 (and we may need it in general, since
we like to emit our conditionals as negations), but overall
this seems like a better place for cvp in our pass pipeline.1 parent 7a561bd commit 032ac76
1 file changed
+4
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
863 | 863 | | |
864 | 864 | | |
865 | 865 | | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
866 | 870 | | |
867 | 871 | | |
868 | | - | |
869 | 872 | | |
870 | 873 | | |
871 | 874 | | |
872 | 875 | | |
873 | | - | |
874 | | - | |
875 | | - | |
876 | 876 | | |
877 | 877 | | |
878 | 878 | | |
| |||
0 commit comments