[InstCombine] canonicalize urem as cmp+select
authorzhongyunde <zhongyunde@huawei.com>
Mon, 20 Feb 2023 15:49:13 +0000 (23:49 +0800)
committerzhongyunde <zhongyunde@huawei.com>
Mon, 20 Feb 2023 15:52:10 +0000 (23:52 +0800)
commitee9a0f30ca8a3582d0738f7499ea902e1f713b39
tree592cc0ef5577dceb2f13f314629cd8de902440dc
parent45a0b812fa13ec255cae91f974540a4d805a8d79
[InstCombine] canonicalize urem as cmp+select

Fix https://github.com/llvm/llvm-project/issues/60546

Reviewed By: nikic, efriedma, RKSimon, spatel

Differential Revision: https://reviews.llvm.org/D143883
llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
llvm/test/Transforms/InstCombine/urem-via-cmp-select.ll