[PATCH] D109308: [SelectionDAG][VP] Fix MemSDNode::getBasePtr
Fraser Cormack via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 6 02:45:40 PDT 2021
frasercrmck created this revision.
frasercrmck added reviewers: simoll, hussainjk, craig.topper, rogfer01.
Herald added a subscriber: ecnelises.
frasercrmck requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Found while working on D108987 <https://reviews.llvm.org/D108987>. When interpreting VP nodes as
`MemSDNode` nodes, this function would return the incorrect indices.
This was due to `VP_GATHER` and having no "passthru", and both
`VP_GATHER` and `VP_SCATTER` having their mask operands *after* the base
pointer, unlike `MGATHER` and `MSCATTER`.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D109308
Files:
llvm/include/llvm/CodeGen/SelectionDAGNodes.h
Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
===================================================================
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h
@@ -1363,11 +1363,10 @@
case ISD::STORE:
case ISD::VP_STORE:
case ISD::MSTORE:
+ case ISD::VP_SCATTER:
return getOperand(2);
case ISD::MGATHER:
case ISD::MSCATTER:
- case ISD::VP_GATHER:
- case ISD::VP_SCATTER:
return getOperand(3);
default:
return getOperand(1);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D109308.370872.patch
Type: text/x-patch
Size: 545 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210906/f0868fa1/attachment.bin>
More information about the llvm-commits
mailing list