[PATCH] D84324: AMDGPU/GlobalISel: Lower G_FREM

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 23 03:20:37 PDT 2020


foad added a comment.

In D84324#2168127 <https://reviews.llvm.org/D84324#2168127>, @arsenm wrote:

> I don't think copy the DAG path was necessarily the right choice. The correct thing to do might be to make the DAG path use floor? Is either even correct if this fails conformance?
>
> I don't think this should go in generic code unless we're more sure this is the correct operation


I am convinced that trunc (not floor) is what you need here to implement IR's frem instruction, where the result has the same sign as the dividend (same as the C library fmod).


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

https://reviews.llvm.org/D84324





More information about the llvm-commits mailing list