[InstCombine] fold udiv with hidden common factor
authorSanjay Patel <spatel@rotateright.com>
Thu, 6 Oct 2022 15:33:19 +0000 (11:33 -0400)
committerSanjay Patel <spatel@rotateright.com>
Thu, 6 Oct 2022 15:35:27 +0000 (11:35 -0400)
commit6b869be8100d6c1b93bdaff1dc96a80a903c8fc7
tree0e26541303f3fa56f295c8a0ee59d6c47dc2cea0
parent34cca2bd4a2daec12f178fd1dd4285dd2ac74f65
[InstCombine] fold udiv with hidden common factor

(X * Y) u/ (X << Z) --> Y u>> Z

https://alive2.llvm.org/ce/z/4G9D_W
llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
llvm/test/Transforms/InstCombine/div-shift.ll