[all-commits] [llvm/llvm-project] d1762f: [AMDGPU] Use d16 flag for image.sample instructions
Mariusz Sikora via All-commits
all-commits at lists.llvm.org
Mon Apr 25 05:06:04 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: d1762fc454c0d7ee0bcffe87e798f67b6c43c1d2
https://github.com/llvm/llvm-project/commit/d1762fc454c0d7ee0bcffe87e798f67b6c43c1d2
Author: Mariusz Sikora <mariusz.sikora at amd.com>
Date: 2022-04-25 (Mon, 25 Apr 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