Skip to content

PeepholeOpt: Remove unnecessary check for null TargetInstrInfo #123929

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 23, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions llvm/lib/CodeGen/PeepholeOptimizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1991,11 +1991,6 @@ ValueTrackerResult ValueTracker::getNextSourceFromRegSequence() {
// turn that into an assertion.
return ValueTrackerResult();

if (!TII)
// We could handle the REG_SEQUENCE here, but we do not want to
// duplicate the code from the generic TII.
return ValueTrackerResult();

SmallVector<RegSubRegPairAndIdx, 8> RegSeqInputRegs;
if (!TII->getRegSequenceInputs(*Def, DefIdx, RegSeqInputRegs))
return ValueTrackerResult();
Expand Down Expand Up @@ -2024,11 +2019,6 @@ ValueTrackerResult ValueTracker::getNextSourceFromInsertSubreg() {
// I.e., this may be turned into an assert.
return ValueTrackerResult();

if (!TII)
// We could handle the REG_SEQUENCE here, but we do not want to
// duplicate the code from the generic TII.
return ValueTrackerResult();

RegSubRegPair BaseReg;
RegSubRegPairAndIdx InsertedReg;
if (!TII->getInsertSubregInputs(*Def, DefIdx, BaseReg, InsertedReg))
Expand Down Expand Up @@ -2078,11 +2068,6 @@ ValueTrackerResult ValueTracker::getNextSourceFromExtractSubreg() {
if (DefSubReg)
return ValueTrackerResult();

if (!TII)
// We could handle the EXTRACT_SUBREG here, but we do not want to
// duplicate the code from the generic TII.
return ValueTrackerResult();

RegSubRegPairAndIdx ExtractSubregInputReg;
if (!TII->getExtractSubregInputs(*Def, DefIdx, ExtractSubregInputReg))
return ValueTrackerResult();
Expand Down
Loading