Commit 8e7247a
committed
[SelectionDAG] Fix off by one error in range check in DAGTypeLegalizer::ExpandShiftByConstant.
The code was considering shifts by an about larger than the number of
bits in the original VT to be out of range. Shifts exactly equal to
the original bit width are also out of range.
I don't know how to test this. DAGCombiner should usually fold this
away. I just noticed while looking for something else in this code. The
llvm-cov report shows that we don't have coverage for out of range shifts here.
Reviewed By: arsenm
Differential Revision: https://reviews.llvm.org/D1201701 parent efb3832 commit 8e7247a
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2468 | 2468 | | |
2469 | 2469 | | |
2470 | 2470 | | |
2471 | | - | |
| 2471 | + | |
2472 | 2472 | | |
2473 | 2473 | | |
2474 | 2474 | | |
| |||
2489 | 2489 | | |
2490 | 2490 | | |
2491 | 2491 | | |
2492 | | - | |
| 2492 | + | |
2493 | 2493 | | |
2494 | 2494 | | |
2495 | 2495 | | |
| |||
2510 | 2510 | | |
2511 | 2511 | | |
2512 | 2512 | | |
2513 | | - | |
| 2513 | + | |
2514 | 2514 | | |
2515 | 2515 | | |
2516 | 2516 | | |
| |||
0 commit comments