Commit bdcd7c0
authored
[DAGCombiner][RISCV] Preserve disjoint flag in folding (shl (or x, c1), c2) -> (or (shl x, c2), c1 << c2) (llvm#76860)
Since we are shifting both inputs to the original Or by the same amount
and inserting zeros in the LSBs, the result should still be disjoint.1 parent a24c581 commit bdcd7c0
File tree
2 files changed
+6
-3
lines changed- llvm
- lib/CodeGen/SelectionDAG
- test/CodeGen/RISCV
2 files changed
+6
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10055 | 10055 | | |
10056 | 10056 | | |
10057 | 10057 | | |
10058 | | - | |
| 10058 | + | |
| 10059 | + | |
| 10060 | + | |
| 10061 | + | |
| 10062 | + | |
10059 | 10063 | | |
10060 | 10064 | | |
10061 | 10065 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
355 | 355 | | |
356 | 356 | | |
357 | 357 | | |
358 | | - | |
359 | 358 | | |
360 | | - | |
| 359 | + | |
361 | 360 | | |
362 | 361 | | |
363 | 362 | | |
| |||
0 commit comments