HomePhabricator

[GlobalISel][KnownBits] Early return on out of bound shift amounts

Authored by kschwarz on Oct 12 2020, 2:45 AM.

Description

[GlobalISel][KnownBits] Early return on out of bound shift amounts

If the known shift amount is bigger than or equal to the bitwidth of the type of the value to be shifted,
the result is target dependent, so don't try to infer any bits.

This fixes a crash we've seen in one of our internal test suites.

Reviewed By: arsenm

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

Details

Committed
kschwarzOct 12 2020, 9:39 AM
Reviewer
arsenm
Differential Revision
D89232: [GlobalISel][KnownBits] Early return on out of bound shift amounts
Parents
rG2f66bfac280f: [Tests] Regenerate test checks; NFC
Branches
Unknown
Tags
Unknown