Skip to content
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
3 changes: 0 additions & 3 deletions llvm/utils/TableGen/Common/CodeGenDAGPatterns.h
Original file line number Diff line number Diff line change
Expand Up @@ -681,9 +681,6 @@ class TreePatternNode : public RefCountedBase<TreePatternNode> {

// Type accessors.
unsigned getNumTypes() const { return Types.size(); }
ValueTypeByHwMode getType(unsigned ResNo) const {
return Types[ResNo].getValueTypeByHwMode();
}
const std::vector<TypeSetByHwMode> &getExtTypes() const { return Types; }
const TypeSetByHwMode &getExtType(unsigned ResNo) const {
return Types[ResNo];
Expand Down
6 changes: 2 additions & 4 deletions llvm/utils/TableGen/FastISelEmitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,8 @@ struct OperandsSignature {

// Emit the type check.
TreePattern *TP = PredFn.getOrigPatFragRecord();
ValueTypeByHwMode VVT = TP->getTree(0)->getType(0);
assert(VVT.isSimple() &&
"Cannot use variable value types with fast isel");
OS << LS << "VT == " << getEnumName(VVT.getSimple().SimpleTy) << " && ";
MVT VT = TP->getTree(0)->getSimpleType(0);
OS << LS << "VT == " << getEnumName(VT) << " && ";

OS << PredFn.getFnName() << "(imm" << Idx << ')';
}
Expand Down
8 changes: 3 additions & 5 deletions llvm/utils/TableGen/GlobalISelEmitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2412,11 +2412,9 @@ void GlobalISelEmitter::emitRunCustomAction(raw_ostream &OS) {

bool hasBFloatType(const TreePatternNode &Node) {
for (unsigned I = 0, E = Node.getNumTypes(); I < E; I++) {
auto Ty = Node.getType(I);
for (auto T : Ty)
if (T.second == MVT::bf16 ||
(T.second.isVector() && T.second.getScalarType() == MVT::bf16))
return true;
MVT VT = Node.getSimpleType(I);
if (VT.getScalarType() == MVT::bf16)
return true;
}
for (const TreePatternNode &C : Node.children())
if (hasBFloatType(C))
Expand Down
Loading