[PATCH] D52018: [AMDGPU] Add instruction selection for i1 to f16 conversion

Nicolai Hähnle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 17 03:09:38 PDT 2018


nhaehnle accepted this revision.
nhaehnle added a comment.
This revision is now accepted and ready to land.

In https://reviews.llvm.org/D52018#1235002, @critson wrote:

> In https://reviews.llvm.org/D52018#1232860, @nhaehnle wrote:
>
> > Why the detour via V_CVT_F16_F32 instead of selecting an fp16 1.0 constant directly?
>
>
> It is not possible select an fp16 constant with V_CNDMASK_B32.
>  In principle the VOP2 version could be used to select an inline literal, but only when the i1 is vcc.


Oh yeah, that makes sense.

Thanks for the sitofp change, LGTM.


Repository:
  rL LLVM

https://reviews.llvm.org/D52018





More information about the llvm-commits mailing list