[PATCH] D149001: [InstSimplify] sdiv a (1 srem b) --> a

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 23 08:43:47 PDT 2023


nikic added a comment.

In D149001#4290441 <https://reviews.llvm.org/D149001#4290441>, @floatshadow wrote:

> another question is can this method replace the original pattern match like `match(Op1, m_One())`? I worry about the performance of `computeKnownBits()`.

It's okay to replace in this case. Division instructions are very rare, so this is not particularly performance sensitive.

> I am not sure what I should do now, alive2 tells me that the transforms seems correct https://alive2.llvm.org/ce/z/NfVsmT

You can just regenerate the test. It's a fuzzer generated test case, so we don't really care as long as it doesn't infinite loop / miscompile.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D149001/new/

https://reviews.llvm.org/D149001



More information about the llvm-commits mailing list