[PATCH] D108131: AMDGPU: During img instruction ret value construction cater for non int values
David Stuttard via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 17 01:09:41 PDT 2021
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGebdb0d09a4f4: AMDGPU: During img instruction ret value construction cater for non int values (authored by dstuttard).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D108131/new/
https://reviews.llvm.org/D108131
Files:
llvm/lib/Target/AMDGPU/SIISelLowering.cpp
Index: llvm/lib/Target/AMDGPU/SIISelLowering.cpp
===================================================================
--- llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+++ llvm/lib/Target/AMDGPU/SIISelLowering.cpp
@@ -5948,6 +5948,9 @@
EVT LegalReqRetVT = ReqRetVT;
if (!ReqRetVT.isVector()) {
+ if (!Data.getValueType().isInteger())
+ Data = DAG.getNode(ISD::BITCAST, DL,
+ Data.getValueType().changeTypeToInteger(), Data);
Data = DAG.getNode(ISD::TRUNCATE, DL, ReqRetVT.changeTypeToInteger(), Data);
} else {
// We need to widen the return vector to a legal type
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D108131.366824.patch
Type: text/x-patch
Size: 613 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210817/038e4bd2/attachment.bin>
More information about the llvm-commits
mailing list