[PATCH] D122968: [AArch64][SelectionDAG] Add target-specific implementation of srem

chenglin.bi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 17 19:58:05 PDT 2022


bcl5980 added a comment.

In D122968#3456041 <https://reviews.llvm.org/D122968#3456041>, @mstorsjo wrote:

> In D122968#3455783 <https://reviews.llvm.org/D122968#3455783>, @mstorsjo wrote:
>
>> 
>
> After this change, it gets incorrectly compiled into this:
>
>   func:
>           and     w8, w0, #0x1
>           cmp     w0, #0
>           cneg    w8, w8, ge

Should be 'csneg w8, w8, w8, ge' here

>   add     w0, w8, w0
>   ret
>
>   

Thanks for the finding. I have no AArch64 device for now , so can you help to modify line 13600 to

  SDValue Cmp = getAArch64Cmp(N0, Zero, ISD::SETGE, CCVal, DAG, DL);  


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D122968



More information about the llvm-commits mailing list