diff options
author | Sanjay Patel <spatel@rotateright.com> | 2022-10-08 10:09:44 -0400 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2022-10-08 10:09:44 -0400 |
commit | eccb9a77c6e4222b385d3c214dd28fcc66938023 (patch) | |
tree | 441eb353a281e15d6ef1a5621b31d60276a0ec07 /llvm/lib/Support/StringRef.cpp | |
parent | ebda06686ffe002b24582f78551b3a2adda54d2a (diff) | |
download | llvm-eccb9a77c6e4222b385d3c214dd28fcc66938023.zip llvm-eccb9a77c6e4222b385d3c214dd28fcc66938023.tar.gz llvm-eccb9a77c6e4222b385d3c214dd28fcc66938023.tar.bz2 |
[InstCombine] fold exact sdiv to ashr (2nd try)
The 1st attempt failed to updated the test checks as expected.
Original commit message:
sdiv exact X, (1<<ShAmt) --> ashr exact X, ShAmt (if shl is non-negative)
https://alive2.llvm.org/ce/z/kB6VF7
It would probably be better to use ValueTracking to replace this
and the existing transform above it, but the analysis does not
account for the no-wrap properly, and it's not immediately clear
to me how to fix it.
Diffstat (limited to 'llvm/lib/Support/StringRef.cpp')
0 files changed, 0 insertions, 0 deletions