Commit 6c373ce
committed
[AArch64] Optimized rdsvl followed by constant mul (llvm#162853)
Currently when RDSVL is followed by constant multiplication, no specific
optimization exist which would leverage the immediate multiplication
operand to generate simpler assembly. This patch adds such optimization
and allow rewrites like these if certain conditions are met:
`(mul (srl (rdsvl 1), 3), x) -> (shl (rdsvl y), z) `1 parent e95a92f commit 6c373ce
File tree
2 files changed
+166
-1
lines changed- llvm
- lib/Target/AArch64
- test/CodeGen/AArch64
2 files changed
+166
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19476 | 19476 | | |
19477 | 19477 | | |
19478 | 19478 | | |
| 19479 | + | |
| 19480 | + | |
| 19481 | + | |
| 19482 | + | |
| 19483 | + | |
| 19484 | + | |
| 19485 | + | |
| 19486 | + | |
| 19487 | + | |
| 19488 | + | |
| 19489 | + | |
| 19490 | + | |
| 19491 | + | |
| 19492 | + | |
| 19493 | + | |
| 19494 | + | |
| 19495 | + | |
| 19496 | + | |
| 19497 | + | |
| 19498 | + | |
| 19499 | + | |
| 19500 | + | |
| 19501 | + | |
| 19502 | + | |
| 19503 | + | |
| 19504 | + | |
| 19505 | + | |
| 19506 | + | |
| 19507 | + | |
| 19508 | + | |
| 19509 | + | |
| 19510 | + | |
| 19511 | + | |
| 19512 | + | |
| 19513 | + | |
| 19514 | + | |
| 19515 | + | |
| 19516 | + | |
| 19517 | + | |
| 19518 | + | |
| 19519 | + | |
| 19520 | + | |
| 19521 | + | |
| 19522 | + | |
| 19523 | + | |
| 19524 | + | |
| 19525 | + | |
| 19526 | + | |
| 19527 | + | |
| 19528 | + | |
| 19529 | + | |
| 19530 | + | |
| 19531 | + | |
| 19532 | + | |
| 19533 | + | |
19479 | 19534 | | |
19480 | 19535 | | |
19481 | 19536 | | |
| |||
19604 | 19659 | | |
19605 | 19660 | | |
19606 | 19661 | | |
| 19662 | + | |
| 19663 | + | |
| 19664 | + | |
19607 | 19665 | | |
19608 | 19666 | | |
19609 | 19667 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 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 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
0 commit comments