From 45eb3b94d4e1327a9538fdb9536abc6659626928 Mon Sep 17 00:00:00 2001 From: Ahmed Bougacha Date: Tue, 2 Aug 2016 11:41:16 +0000 Subject: [GlobalISel] Don't RegBankSelect target-specific instructions. They don't have types and should be using register classes. llvm-svn: 277447 --- llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp') diff --git a/llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp b/llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp index 521bb795682..6248ab46097 100644 --- a/llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp +++ b/llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp @@ -554,7 +554,13 @@ bool RegBankSelect::runOnMachineFunction(MachineFunction &MF) { MII != End;) { // MI might be invalidated by the assignment, so move the // iterator before hand. - assignInstr(*MII++); + MachineInstr &MI = *MII++; + + // Ignore target-specific instructions: they should use proper regclasses. + if (isTargetSpecificOpcode(MI.getOpcode())) + continue; + + assignInstr(MI); } } OptMode = SaveOptMode; -- cgit v1.2.3