Commit b189b89
authored
[InstCombine] Relax the conditons of fold of
This extends the optimisation implemented in #107769 by relaxing the
condtions to make it happen. Now, the value produced by `ucmp`/`scmp`
doesn't need to be one-use, but only one-user, meaning it can be present
in a single phi node more than once.ucmp/scmp into phi by allowing the phi node to use the result of ucmp/scmp more than once (#109593)1 parent bf79156 commit b189b89
File tree
2 files changed
+46
-11
lines changed- llvm
- lib/Transforms/InstCombine
- test/Transforms/InstCombine
2 files changed
+46
-11
lines changedLines changed: 14 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1826 | 1826 | | |
1827 | 1827 | | |
1828 | 1828 | | |
1829 | | - | |
1830 | | - | |
1831 | | - | |
1832 | 1829 | | |
1833 | | - | |
| 1830 | + | |
1834 | 1831 | | |
1835 | 1832 | | |
1836 | 1833 | | |
| |||
1868 | 1865 | | |
1869 | 1866 | | |
1870 | 1867 | | |
| 1868 | + | |
1871 | 1869 | | |
1872 | 1870 | | |
1873 | 1871 | | |
1874 | 1872 | | |
1875 | | - | |
1876 | | - | |
1877 | | - | |
1878 | | - | |
1879 | | - | |
1880 | | - | |
| 1873 | + | |
| 1874 | + | |
| 1875 | + | |
| 1876 | + | |
| 1877 | + | |
| 1878 | + | |
| 1879 | + | |
| 1880 | + | |
| 1881 | + | |
| 1882 | + | |
| 1883 | + | |
1881 | 1884 | | |
1882 | | - | |
| 1885 | + | |
1883 | 1886 | | |
1884 | 1887 | | |
1885 | 1888 | | |
| |||
Lines changed: 32 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
0 commit comments