Commit 4baf29e
committed
[DAG] Handle cases where a shift amount is larger than the pre-extended value bitwidth
In the (zext (shl (zext x), cst)) -> (shl (zext x), cst) fold, don't use a bitmask / MaskedValueIsZero as we can't guarantee that the shift amount is in bounds.
Fixes llvm#1062021 parent 900cd62 commit 4baf29e
File tree
2 files changed
+33
-5
lines changed- llvm
- lib/CodeGen/SelectionDAG
- test/CodeGen/SystemZ
2 files changed
+33
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14114 | 14114 | | |
14115 | 14115 | | |
14116 | 14116 | | |
14117 | | - | |
14118 | | - | |
14119 | | - | |
14120 | | - | |
14121 | 14117 | | |
14122 | 14118 | | |
14123 | | - | |
| 14119 | + | |
| 14120 | + | |
14124 | 14121 | | |
14125 | 14122 | | |
14126 | 14123 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
0 commit comments