Skip to content

[CodeGenTypes] Remove unused ElSz argument from generated GET_VT_VECATTR #95258

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 4 commits into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
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
12 changes: 6 additions & 6 deletions llvm/include/llvm/CodeGenTypes/MachineValueType.h
Original file line number Diff line number Diff line change
Expand Up @@ -438,19 +438,19 @@ namespace llvm {
}

static MVT getVectorVT(MVT VT, unsigned NumElements) {
#define GET_VT_VECATTR(Ty, Sc, nElem, ElTy, ElSz) \
if (!Sc && VT.SimpleTy == ElTy && NumElements == nElem) \
return Ty;
#define GET_VT_VECATTR(Ty, Sc, nElem, ElTy) \
if (!Sc && VT.SimpleTy == ElTy && NumElements == nElem) \
return Ty;
#include "llvm/CodeGen/GenVT.inc"
#undef GET_VT_VECATTR

return (MVT::SimpleValueType)(MVT::INVALID_SIMPLE_VALUE_TYPE);
}

static MVT getScalableVectorVT(MVT VT, unsigned NumElements) {
#define GET_VT_VECATTR(Ty, Sc, nElem, ElTy, ElSz) \
if (Sc && VT.SimpleTy == ElTy && NumElements == nElem) \
return Ty;
#define GET_VT_VECATTR(Ty, Sc, nElem, ElTy) \
if (Sc && VT.SimpleTy == ElTy && NumElements == nElem) \
return Ty;
#include "llvm/CodeGen/GenVT.inc"
#undef GET_VT_VECATTR

Expand Down
5 changes: 2 additions & 3 deletions llvm/utils/TableGen/VTEmitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ void VTEmitter::run(raw_ostream &OS) {
}
OS << "#endif\n\n";

OS << "#ifdef GET_VT_VECATTR // (Ty, Sc, nElem, ElTy, ElSz)\n";
OS << "#ifdef GET_VT_VECATTR // (Ty, Sc, nElem, ElTy)\n";
for (const auto *VT : VTsByNumber) {
if (!VT || !VT->getValueAsBit("isVector"))
continue;
Expand All @@ -126,8 +126,7 @@ void VTEmitter::run(raw_ostream &OS) {
<< VT->getValueAsString("LLVMName") << ", "
<< VT->getValueAsBit("isScalable") << ", "
<< VT->getValueAsInt("nElem") << ", "
<< ElTy->getName() << ", "
<< ElTy->getValueAsInt("Size") << ")\n";
<< ElTy->getName() << ")\n";
// clang-format on
}
OS << "#endif\n\n";
Expand Down
Loading