[PATCH] D133852: [AMDGPU] Check for num elts in SelectVOP3PMods
Piotr Sobczak via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 14 05:09:55 PDT 2022
piotr created this revision.
Herald added subscribers: kosarev, foad, kerbowa, hiraditya, t-tye, tpr, dstuttard, yaxunl, nhaehnle, jvesely, kzhuravl, arsenm.
Herald added a project: All.
piotr requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.
The rest of the code section assumes there are exactly two elements
in the vector (Lo, Hi), so add the check before entering the section.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D133852
Files:
llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp
Index: llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp
===================================================================
--- llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp
+++ llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp
@@ -2704,7 +2704,7 @@
Src = Src.getOperand(0);
}
- if (Src.getOpcode() == ISD::BUILD_VECTOR &&
+ if (Src.getOpcode() == ISD::BUILD_VECTOR && Src.getNumOperands() == 2 &&
(!IsDOT || !Subtarget->hasDOTOpSelHazard())) {
unsigned VecMods = Mods;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D133852.460042.patch
Type: text/x-patch
Size: 489 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220914/fcc474fd/attachment.bin>
More information about the llvm-commits
mailing list