[PATCH] D60395: [InstCombine] Canonicalize (-X s/ Y) to -(X s/ Y)

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 9 07:10:09 PDT 2019


lebedev.ri accepted this revision.
lebedev.ri added a comment.
This revision is now accepted and ready to land.

In D60395#1459712 <https://reviews.llvm.org/D60395#1459712>, @shchenz wrote:

> address comments.


Ok, thank you, looks good now.

In D60395#1458897 <https://reviews.llvm.org/D60395#1458897>, @lebedev.ri wrote:

>   ----------------------------------------
>   Optimization: nsw preserved
>   Precondition: true
>     %o0 = sub nsw i8 0, %x
>     %r = srem i8 %o0, %y
>   =>
>     %n0 = srem i8 %x, %y
>     %r = sub nsw i8 0, %n0
>  
>   Done: 1
>   Optimization is correct!
>


@shchenz if you don't intend to immediately-ish submit a patch for that sibling pattern, could you please file a bug?


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

https://reviews.llvm.org/D60395





More information about the llvm-commits mailing list