[InstCombine] Use KnownBits::udiv() helper
authorNikita Popov <npopov@redhat.com>
Wed, 17 May 2023 15:01:58 +0000 (17:01 +0200)
committerNikita Popov <npopov@redhat.com>
Wed, 17 May 2023 15:03:35 +0000 (17:03 +0200)
commit1bd2cc5f7b50e31746a21c678daa765c0f9b4c4d
treeacdd7599619cad17e0b8c7155a501eb0f9b1951a
parentf84bac329ba6c9f0c022bcf77237e912362e247a
[InstCombine] Use KnownBits::udiv() helper

This produces more precise results than the ad-hoc implementation.

Noticed while trying to add a consistency assertion.
llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp