[llvm] r290376 - [MIRParser] Non-generic virtual register may have a type.
Quentin Colombet via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 22 13:56:29 PST 2016
Author: qcolombet
Date: Thu Dec 22 15:56:29 2016
New Revision: 290376
URL: http://llvm.org/viewvc/llvm-project?rev=290376&view=rev
Log:
[MIRParser] Non-generic virtual register may have a type.
When generic virtual registers get constrained, because of a use on a
target specific operation for instance, we end up with regular virtual
registers with a type and that's perfectly fine.
Removed:
llvm/trunk/test/CodeGen/MIR/X86/unexpected-size-non-generic-register.mir
Modified:
llvm/trunk/lib/CodeGen/MIRParser/MIParser.cpp
Modified: llvm/trunk/lib/CodeGen/MIRParser/MIParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MIRParser/MIParser.cpp?rev=290376&r1=290375&r2=290376&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MIRParser/MIParser.cpp (original)
+++ llvm/trunk/lib/CodeGen/MIRParser/MIParser.cpp Thu Dec 22 15:56:29 2016
@@ -1029,9 +1029,6 @@ bool MIParser::parseRegisterOperand(Mach
// Virtual registers may have a size with GlobalISel.
if (!TargetRegisterInfo::isVirtualRegister(Reg))
return error("unexpected size on physical register");
- if (RegInfo->Kind != VRegInfo::GENERIC &&
- RegInfo->Kind != VRegInfo::REGBANK)
- return error("unexpected size on non-generic virtual register");
LLT Ty;
if (parseLowLevelType(Token.location(), Ty))
Removed: llvm/trunk/test/CodeGen/MIR/X86/unexpected-size-non-generic-register.mir
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/MIR/X86/unexpected-size-non-generic-register.mir?rev=290375&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/MIR/X86/unexpected-size-non-generic-register.mir (original)
+++ llvm/trunk/test/CodeGen/MIR/X86/unexpected-size-non-generic-register.mir (removed)
@@ -1,14 +0,0 @@
-# RUN: not llc -march=x86-64 -run-pass none -o /dev/null %s 2>&1 | FileCheck %s
-# This test ensures that an error is reported when a register operand is sized
-# but isn't generic like a regular virtual register (gr32).
-
----
-name: test_size_regclass
-registers:
- - { id: 0, class: gr32 }
-body: |
- bb.0.entry:
- liveins: %edi
- ; CHECK: [[@LINE+1]]:8: unexpected size on non-generic virtual register
- %0(32) = G_ADD i32 %edi, %edi
-...
More information about the llvm-commits
mailing list