diff options
author | Mariusz Sikora <mariusz.sikora@amd.com> | 2022-04-25 12:57:27 +0100 |
---|---|---|
committer | Mariusz Sikora <mariusz.sikora@amd.com> | 2022-05-05 06:29:19 +0200 |
commit | 2417de2758c306c5509782400ba9e0bb70851989 (patch) | |
tree | eb269a76503ef0342b6e097f1afbea3a97df67c1 /clang/lib/Frontend/CreateInvocationFromCommandLine.cpp | |
parent | 2407c13aa4a42f3a3438ae2d03fa38df0a5fd30b (diff) | |
download | llvm-2417de2758c306c5509782400ba9e0bb70851989.zip llvm-2417de2758c306c5509782400ba9e0bb70851989.tar.gz llvm-2417de2758c306c5509782400ba9e0bb70851989.tar.bz2 |
[AMDGPU] Use d16 flag for image.sample instructions
Image.sample instruction can be forced to return half type instead of
float when d16 flag is enabled.
This patch adds new pattern in InstCombine to detect if output of
image.sample is used later only by fptrunc which converts the type
from float to half. If pattern is detected then fptrunc and image.sample
are combined to single image.sample which is returning half type.
Later in Lowering part d16 flag is added to image sample intrinsic.
Differential Revision: https://reviews.llvm.org/D124232
Diffstat (limited to 'clang/lib/Frontend/CreateInvocationFromCommandLine.cpp')
0 files changed, 0 insertions, 0 deletions