Skip to content
Commit 8e7247a3 authored by Craig Topper's avatar Craig Topper
Browse files

[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/D120170
parent efb38326
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment