HomePhabricator

[SelectionDAG] Fix assertion failure with big shift amounts

Authored by LemonBoy on May 6 2020, 11:39 AM.

Description

[SelectionDAG] Fix assertion failure with big shift amounts

Calling getShiftAmountTy with LegalTypes set may return a type that's too narrow to hold the shift amount for integer type it's applied to.

Fixes the regression introduced by D79096

Differential Revision: https://reviews.llvm.org/D79405