Skip to content
Commit 684963b8 authored by Noah Goldstein's avatar Noah Goldstein
Browse files

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