[PATCH] D124232: [AMDGPU] Use d16 flag for image.sample instructions
Mariusz Sikora via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 22 10:10:56 PDT 2022
mariusz-sikora-at-amd marked 3 inline comments as done.
mariusz-sikora-at-amd added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUInstCombineIntrinsic.cpp:232
+ // intrinsic with D16 flag.
+ if (II.hasOneUse()) {
+ Instruction *user = II.user_back();
----------------
foad wrote:
> As a further improvement you could handle multiple uses if all of them are fptruncs - but perhaps that will never happen in practice because of CSE.
If you are referring to:
%s = call half @llvm.amdgcn.image.xxx
%s1 = fptrunc float %s to half
%s2 = fptrunc float %s to half
...
then this will be optimize before entering to simplifyAMDGCNImageIntrinsic
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D124232/new/
https://reviews.llvm.org/D124232
More information about the llvm-commits
mailing list