llvm.org GIT mirror llvm / 1750581
[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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290376 91177308-0d34-0410-b5e6-96231b3b80d8 Quentin Colombet 3 years ago
2 changed file(s) with 0 addition(s) and 17 deletion(s). Raw diff Collapse all Expand all
10281028 // Virtual registers may have a size with GlobalISel.
10291029 if (!TargetRegisterInfo::isVirtualRegister(Reg))
10301030 return error("unexpected size on physical register");
1031 if (RegInfo->Kind != VRegInfo::GENERIC &&
1032 RegInfo->Kind != VRegInfo::REGBANK)
1033 return error("unexpected size on non-generic virtual register");
10341031
10351032 LLT Ty;
10361033 if (parseLowLevelType(Token.location(), Ty))
+0
-14
test/CodeGen/MIR/X86/unexpected-size-non-generic-register.mir less more
None # RUN: not llc -march=x86-64 -run-pass none -o /dev/null %s 2>&1 | FileCheck %s
1 # This test ensures that an error is reported when a register operand is sized
2 # but isn't generic like a regular virtual register (gr32).
3
4 ---
5 name: test_size_regclass
6 registers:
7 - { id: 0, class: gr32 }
8 body: |
9 bb.0.entry:
10 liveins: %edi
11 ; CHECK: [[@LINE+1]]:8: unexpected size on non-generic virtual register
12 %0(32) = G_ADD i32 %edi, %edi
13 ...