Commit 5894870
Automerge: [RISCV] Add computeKnownBitsForTargetNode for RISCVISD::SRAW. (#156191)
This node reads the lower 32 bits, shifts it right arithmetically
then sign extends to i64. If we know some of the lower 32 bits we
can propagate that information.
For the test case I had to find something that didn't get optimized
before type legalizaton and didn't get type legalized to a sign
extended value. The bswap gets type legalized to (lshr (bswap), 32).File tree
2 files changed
+34
-0
lines changed- llvm
- lib/Target/RISCV
- test/CodeGen/RISCV
2 files changed
+34
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21379 | 21379 | | |
21380 | 21380 | | |
21381 | 21381 | | |
| 21382 | + | |
| 21383 | + | |
| 21384 | + | |
| 21385 | + | |
| 21386 | + | |
| 21387 | + | |
| 21388 | + | |
| 21389 | + | |
| 21390 | + | |
21382 | 21391 | | |
21383 | 21392 | | |
21384 | 21393 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
235 | 235 | | |
236 | 236 | | |
237 | 237 | | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
0 commit comments