From 46c05fc861c49b82e049aefd9799bc39edb2b768 Mon Sep 17 00:00:00 2001 From: Ahmed Bougacha Date: Thu, 28 Jul 2016 16:58:27 +0000 Subject: [GlobalISel] Remove types on selected insts instead of using LLT(). LLT() has a particular meaning: it's one invalid type. But we really want selected instructions to have no type whatsoever. Also verify that types don't linger after ISel, and enable the verifier on the AArch64 select test. llvm-svn: 277001 --- llvm/lib/CodeGen/MachineInstr.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'llvm/lib/CodeGen/MachineInstr.cpp') diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp index ac5ce811f3a..ca3799db1ed 100644 --- a/llvm/lib/CodeGen/MachineInstr.cpp +++ b/llvm/lib/CodeGen/MachineInstr.cpp @@ -716,6 +716,8 @@ void MachineInstr::setType(LLT Ty, unsigned Idx) {} LLT MachineInstr::getType(unsigned Idx) const { return LLT{}; } +void MachineInstr::removeTypes() {} + #else unsigned MachineInstr::getNumTypes() const { return Tys.size(); } @@ -728,6 +730,10 @@ void MachineInstr::setType(LLT Ty, unsigned Idx) { } LLT MachineInstr::getType(unsigned Idx) const { return Tys[Idx]; } + +void MachineInstr::removeTypes() { + Tys.clear(); +} #endif // LLVM_BUILD_GLOBAL_ISEL /// RemoveRegOperandsFromUseLists - Unlink all of the register operands in -- cgit v1.2.3