[PATCH] D106745: [DAG] DAGCombiner::useDivRem - recognise sub(X,mul(div(X,Y),Y)) as a rem(X,Y)

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 24 10:52:42 PDT 2021


lebedev.ri added a comment.

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

> In D106745#2902526 <https://reviews.llvm.org/D106745#2902526>, @RKSimon wrote:
>
>> I'm so sorry, this was chasing what I thought was a bug in PR51014 but was just a screwup on my part - sorry for wasting your time
>
> I do not follow.
> It *is* an expanded rem: https://alive2.llvm.org/ce/z/oYT73P
> And the divrempairs pass actively fights against it: https://godbolt.org/z/9P7qeqb9E
> Because `TargetTransformInfo::hasDivRemOp()` said that there is no divrem for i8.

Ah yes, `-mtriple=x86_64---` helps https://godbolt.org/z/o68Wea4r1.
I didn't pay enough attention :/


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D106745



More information about the llvm-commits mailing list