[PATCH] D147108: [InstCombine] Add transforms for `(rem (shl Y, X), (shl Z, X))`

Noah Goldstein via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 19 09:30:11 PDT 2023


goldstein.w.n added inline comments.


================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp:1808
+    ShiftByX = true;
+  } else {
     return nullptr;
----------------
sdesmalen wrote:
> goldstein.w.n wrote:
> > sdesmalen wrote:
> > > goldstein.w.n wrote:
> > > > sdesmalen wrote:
> > > > > nit: unnecessary curly braces (same above)
> > > > IIRC, style is if any of the `if` need a curly, then all should have.
> > > In this case none of the blocks needs the curly braces if you change the first block to `; // pass` ?
> > > In this case none of the blocks needs the curly braces if you change the first block to `; // pass` ?
> > 
> > Sure, will do. I'll update when I rebase later. Any chance you will also be able to review D143417?
> Thanks! Are you happy to merge the three accepted patches?
> 
> I've currently got quite a few things on my plate so I'm not sure how much time I'll have to review D143417 (especially given its complexity), but I'll try to have a look at it next week.
Sure, I'll merge inbetween reviews. No rush and thank you for the reviews thus far :)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D147108



More information about the llvm-commits mailing list