[InstCombine] refactor sdiv by (negative) power-of-2 folds; NFCI
authorSanjay Patel <spatel@rotateright.com>
Fri, 7 Oct 2022 15:21:28 +0000 (11:21 -0400)
committerSanjay Patel <spatel@rotateright.com>
Fri, 7 Oct 2022 15:35:17 +0000 (11:35 -0400)
commitbdfefac9a41c2ccd33a440efe1bde099e408225c
treed3f07db54f90f2560d48341cd3bd79941ce8ed36
parent68f267d2df4de9bb486683dc83551c7edb3dd9f1
[InstCombine] refactor sdiv by (negative) power-of-2 folds; NFCI

It's probably better to try harder on this kind of
pattern by using ValueTracking.
llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
llvm/test/Transforms/InstCombine/sdiv-exact-by-negative-power-of-two.ll
llvm/test/Transforms/InstCombine/sdiv-exact-by-power-of-two.ll