[PATCH] D110579: [AMDGPU] Add a new intrinsic to control fp_trunc rounding mode

Julien Pagès via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 8 13:42:11 PST 2022


jpages marked 5 inline comments as done.
jpages added inline comments.


================
Comment at: llvm/docs/LangRef.rst:23879
+This instruction is assumed to execute in the default :ref:`floating-point
+environment <floatenv>` *except* for the rounding mode.
----------------
craig.topper wrote:
> Should we document that this isn't supported on all targets, and that a particular target may not support all rounding modes?
Good idea, thanks! I added a comment about that


================
Comment at: llvm/test/CodeGen/AMDGPU/fail.llvm.fptrunc.round.ll:1
+; RUN: not --crash llc -march=amdgcn -mcpu=gfx1030 -verify-machineinstrs -o /dev/null %s 2>&1 | FileCheck %s --ignore-case --check-prefix=FAIL
+; RUN: not --crash llc -global-isel -march=amdgcn -mcpu=gfx1030 -verify-machineinstrs -o /dev/null %s 2>&1 | FileCheck %s --ignore-case --check-prefix=FAIL
----------------
foad wrote:
> Does this test work in a Release build? If not, you can add a "REQUIRES: asserts" line just after the RUN lines.
I just checked and it's working as well in Release without that.


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

https://reviews.llvm.org/D110579



More information about the llvm-commits mailing list