forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ValueTracking] Use maximum shift count in
shl
when determining if …
…`shl` can be zero. Previously only return `shl` non-zero if the shift value was `1`. We can expand this if we have some bounds on the shift count. For example: ``` %cnt = and %c, 16 ; Max cnt == 16 %val = or %v, 4 ; val[2] is known one %shl = shl %val, %cnt ; (val.known.one << cnt.maxval) != 0 ``` Differential Revision: https://reviews.llvm.org/D147897
- Loading branch information
1 parent
e7999fb
commit 684963b
Showing
2 changed files
with
12 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters