[ValueTracking] Use knownbits interface for determining if `div`/`rem` are safe to...
authorNoah Goldstein <goldstein.w.n@gmail.com>
Sun, 30 Apr 2023 15:16:55 +0000 (10:16 -0500)
committerNoah Goldstein <goldstein.w.n@gmail.com>
Sun, 30 Apr 2023 15:40:46 +0000 (10:40 -0500)
commitfbc7fcf5ae26fad7db3e7c861fc6447e02b39cf0
treef2c0ccff37d04158038948b2f4376f994d38e8cf
parent824e9bb2e33655734eb3e9169ba5c4964cc1861c
[ValueTracking] Use knownbits interface for determining if `div`/`rem` are safe to speculate

This just replaces the exact constant requirements with known-bits
which can prove better results.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D149423
llvm/lib/Analysis/ValueTracking.cpp
llvm/test/Transforms/LICM/speculate-div.ll