[PATCH] D110579: [AMDGPU] Add two new intrinsics to control fp_trunc rounding mode

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 11 01:41:37 PDT 2021


foad added a comment.

In D110579#3051790 <https://reviews.llvm.org/D110579#3051790>, @jpages wrote:

> The consequence of this change is the use of setreg instead of s_round_mode in the codegen. But it's probably better to not reinvent the wheel as this pass is already optimized to not insert too many setreg.

Good point. s_round_mode/s_denorm_mode are new in GFX10, so they did not exist when this pass was written. Do you think the pass could be improved to emit s_round_mode/s_denorm_mode instead of s_setreg whenever it only needs to change the rounding/denormal bits of the mode register? That could be a separate patch.


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

https://reviews.llvm.org/D110579



More information about the llvm-commits mailing list