Commit 5356857
authored
Add simple Else conditions to If Conversion (#77728)
* Add simple Else conditions to If Conversion
For example:
if (x < 7) { a = 5; } else { a = 9; }
a = (cond) ? b : c;
The else condition must write to the same variable as the then
statement.
* Move phase and stop updating ssa
* Wrap JitConfig access
* Add GT_RETURN else cases
* Add test cases with verification checks
* Ensure single only operation condition checks are used
* Remove empty line
* Use DOTNET_ instead of COMPlus_
* Move JitDoIfConversion check
* Move if conversion into it's own file
* Always invert condition
* Rename IfConvertMergeBlocks
* Use gtGetOp1()
* Expand tests
* Add operation type assert
* Allow nested SELECT nodes
* Fix condition directions1 parent becfc23 commit 5356857
5 files changed
Lines changed: 998 additions & 373 deletions
File tree
- src
- coreclr/jit
- tests/JIT/opt/Compares
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| 127 | + | |
127 | 128 | | |
128 | 129 | | |
129 | 130 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4755 | 4755 | | |
4756 | 4756 | | |
4757 | 4757 | | |
4758 | | - | |
4759 | 4758 | | |
4760 | 4759 | | |
4761 | 4760 | | |
| |||
4769 | 4768 | | |
4770 | 4769 | | |
4771 | 4770 | | |
4772 | | - | |
4773 | 4771 | | |
4774 | 4772 | | |
4775 | 4773 | | |
| |||
4852 | 4850 | | |
4853 | 4851 | | |
4854 | 4852 | | |
4855 | | - | |
4856 | | - | |
4857 | | - | |
4858 | | - | |
4859 | | - | |
4860 | | - | |
4861 | | - | |
4862 | 4853 | | |
4863 | 4854 | | |
4864 | 4855 | | |
| |||
4910 | 4901 | | |
4911 | 4902 | | |
4912 | 4903 | | |
| 4904 | + | |
| 4905 | + | |
| 4906 | + | |
| 4907 | + | |
4913 | 4908 | | |
4914 | 4909 | | |
4915 | 4910 | | |
| |||
0 commit comments