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

Julien Pagès via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 20 12:14:26 PDT 2021


jpages added a comment.

In D110579#3054424 <https://reviews.llvm.org/D110579#3054424>, @foad wrote:

> 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.

Sure, that's a good suggestion. I'll try to add this in a different patch.


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

https://reviews.llvm.org/D110579



More information about the llvm-commits mailing list