[SelectionDAG] Fix assertion failure with big shift amounts
authorLemonBoy <thatlemon@gmail.com>
Wed, 6 May 2020 18:39:23 +0000 (11:39 -0700)
committerCraig Topper <craig.topper@intel.com>
Wed, 6 May 2020 18:58:37 +0000 (11:58 -0700)
commit7fa5abd3437e94e0983a3baf323cac574d92fc03
treef63b876557557142fa1f66cc0cd8cc335d51bcec
parent57d361bd2f3668eefa7028ad4a2d616317ed437c
[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
llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
llvm/test/CodeGen/X86/load-local-v3i129.ll [new file with mode: 0644]