Commit f73844d
authored
[RISCV] Generate bexti for (select(setcc eq (and x, c))) where c is power of 2. (#73649)
Currently, llvm can transform (setcc ne (and x, c)) to (bexti x,
log2(c)) where c is power of 2.
This patch transform (select (setcc ne (and x, c)), T, F) into (select
(setcc eq (and x, c)), F, T).
It is benefit to the case c is not fit to 12-bits.1 parent 4b8964d commit f73844d
File tree
2 files changed
+317
-190
lines changed- llvm
- lib/Target/RISCV
- test/CodeGen/RISCV
2 files changed
+317
-190
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14236 | 14236 | | |
14237 | 14237 | | |
14238 | 14238 | | |
| 14239 | + | |
| 14240 | + | |
| 14241 | + | |
| 14242 | + | |
| 14243 | + | |
| 14244 | + | |
| 14245 | + | |
| 14246 | + | |
| 14247 | + | |
| 14248 | + | |
| 14249 | + | |
| 14250 | + | |
| 14251 | + | |
| 14252 | + | |
| 14253 | + | |
| 14254 | + | |
| 14255 | + | |
| 14256 | + | |
| 14257 | + | |
| 14258 | + | |
| 14259 | + | |
| 14260 | + | |
| 14261 | + | |
| 14262 | + | |
| 14263 | + | |
| 14264 | + | |
| 14265 | + | |
| 14266 | + | |
| 14267 | + | |
| 14268 | + | |
| 14269 | + | |
14239 | 14270 | | |
14240 | 14271 | | |
14241 | 14272 | | |
14242 | 14273 | | |
14243 | 14274 | | |
| 14275 | + | |
| 14276 | + | |
| 14277 | + | |
14244 | 14278 | | |
14245 | 14279 | | |
14246 | 14280 | | |
| |||
0 commit comments