[PATCH] D130001: [AMDGPU][NFC] Validate G_MERGE_VALUES as we match zero-extended 32-bit scalars.
Ivan Kosarev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 18 05:17:35 PDT 2022
kosarev created this revision.
kosarev added reviewers: foad, arsenm, rampitec.
Herald added subscribers: jsilvanus, kerbowa, hiraditya, t-tye, tpr, dstuttard, yaxunl, nhaehnle, jvesely, kzhuravl.
Herald added a project: All.
kosarev requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D130001
Files:
llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
Index: llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
===================================================================
--- llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
+++ llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
@@ -3237,6 +3237,8 @@
if (Def->getOpcode() != AMDGPU::G_MERGE_VALUES)
return Register();
+ assert(Def->getNumOperands() == 3 &&
+ MRI.getType(Def->getOperand(0).getReg()) == LLT::scalar(64));
if (mi_match(Def->getOperand(2).getReg(), MRI, m_ZeroInt())) {
return Def->getOperand(1).getReg();
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D130001.445462.patch
Type: text/x-patch
Size: 565 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220718/099838c4/attachment.bin>
More information about the llvm-commits
mailing list