[InstCombine] propagate "exact" through folds of div
authorSanjay Patel <spatel@rotateright.com>
Wed, 12 Oct 2022 13:05:34 +0000 (09:05 -0400)
committerSanjay Patel <spatel@rotateright.com>
Wed, 12 Oct 2022 13:25:05 +0000 (09:25 -0400)
commitfe97f95036674692dd85939c867c4312b73df88f
tree8881df49520d8b2978f33b970a7398ca8f18b73e
parent2639caf5608af0b0273a193e0f45f8f965daa21e
[InstCombine] propagate "exact" through folds of div

These folds were added recently with:
6b869be8100d
8da2fa856f1b
...but they didn't account for the "exact" attribute,
and that can be safely propagated:
https://alive2.llvm.org/ce/z/F_WhnR
https://alive2.llvm.org/ce/z/ft9Cgr
llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
llvm/test/Transforms/InstCombine/div-shift.ll