[all-commits] [llvm/llvm-project] 2417de: [AMDGPU] Use d16 flag for image.sample instructions
Mariusz Sikora via All-commits
all-commits at lists.llvm.org
Wed May 4 21:30:14 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 2417de2758c306c5509782400ba9e0bb70851989
https://github.com/llvm/llvm-project/commit/2417de2758c306c5509782400ba9e0bb70851989
Author: Mariusz Sikora <mariusz.sikora at amd.com>
Date: 2022-05-05 (Thu, 05 May 2022)
Changed paths:
M llvm/lib/Target/AMDGPU/AMDGPUInstCombineIntrinsic.cpp
A llvm/test/Transforms/InstCombine/AMDGPU/image-d16.ll
Log Message:
-----------
[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
More information about the All-commits
mailing list