diff options
author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2025-01-30 20:55:48 +0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-30 20:55:48 +0700 |
commit | 83ca720ef280256ffb0424947e4221e95b314a09 (patch) | |
tree | 98e5793f568b668a7ec905c93af8e6c33b7ef3a1 /llvm/lib/CodeGen/PeepholeOptimizer.cpp | |
parent | 8d506b9a5b7cfc9f6f574fc31ac2a013a8dd606a (diff) | |
download | llvm-83ca720ef280256ffb0424947e4221e95b314a09.zip llvm-83ca720ef280256ffb0424947e4221e95b314a09.tar.gz llvm-83ca720ef280256ffb0424947e4221e95b314a09.tar.bz2 |
PeepholeOpt: Remove check for reg_sequence def of subregister (#124512)
The verifier does not allow reg_sequence to have subregister defs,
even if undef.
Diffstat (limited to 'llvm/lib/CodeGen/PeepholeOptimizer.cpp')
-rw-r--r-- | llvm/lib/CodeGen/PeepholeOptimizer.cpp | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/llvm/lib/CodeGen/PeepholeOptimizer.cpp b/llvm/lib/CodeGen/PeepholeOptimizer.cpp index 2fc4820..bf450e3 100644 --- a/llvm/lib/CodeGen/PeepholeOptimizer.cpp +++ b/llvm/lib/CodeGen/PeepholeOptimizer.cpp @@ -1956,22 +1956,7 @@ ValueTrackerResult ValueTracker::getNextSourceFromRegSequence() { assert((Def->isRegSequence() || Def->isRegSequenceLike()) && "Invalid definition"); - if (Def->getOperand(DefIdx).getSubReg()) - // If we are composing subregs, bail out. - // The case we are checking is Def.<subreg> = REG_SEQUENCE. - // This should almost never happen as the SSA property is tracked at - // the register level (as opposed to the subreg level). - // I.e., - // Def.sub0 = - // Def.sub1 = - // is a valid SSA representation for Def.sub0 and Def.sub1, but not for - // Def. Thus, it must not be generated. - // However, some code could theoretically generates a single - // Def.sub0 (i.e, not defining the other subregs) and we would - // have this case. - // If we can ascertain (or force) that this never happens, we could - // turn that into an assertion. - return ValueTrackerResult(); + assert(!Def->getOperand(DefIdx).getSubReg() && "illegal subregister def"); SmallVector<RegSubRegPairAndIdx, 8> RegSeqInputRegs; if (!TII->getRegSequenceInputs(*Def, DefIdx, RegSeqInputRegs)) |