[PATCH] D35985: Skip live range segment verification for reserved physregs
Stefan Maksimovic via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 28 03:29:53 PDT 2017
smaksimovic created this revision.
Exit MachineVerifier::verifyLiveRangeSegment prematurely if the current register being checked is physical and its root regunit reserved.
https://reviews.llvm.org/D35985
Files:
lib/CodeGen/MachineVerifier.cpp
test/CodeGen/Mips/no-odd-spreg-msa.ll
Index: test/CodeGen/Mips/no-odd-spreg-msa.ll
===================================================================
--- test/CodeGen/Mips/no-odd-spreg-msa.ll
+++ test/CodeGen/Mips/no-odd-spreg-msa.ll
@@ -1,8 +1,8 @@
; RUN: llc -march=mipsel -mcpu=mips32 -mattr=+fp64,+msa,-nooddspreg \
-; RUN: -no-integrated-as -relocation-model=pic < %s | \
+; RUN: -no-integrated-as -verify-machineinstrs -relocation-model=pic < %s | \
; RUN: FileCheck %s -check-prefixes=ALL,ODDSPREG
; RUN: llc -march=mipsel -mcpu=mips32 -mattr=+fp64,+msa,+nooddspreg \
-; RUN: -no-integrated-as -relocation-model=pic < %s | \
+; RUN: -no-integrated-as -verify-machineinstrs -relocation-model=pic < %s | \
; RUN: FileCheck %s -check-prefixes=ALL,NOODDSPREG
@v4f32 = global <4 x float> zeroinitializer
Index: lib/CodeGen/MachineVerifier.cpp
===================================================================
--- lib/CodeGen/MachineVerifier.cpp
+++ lib/CodeGen/MachineVerifier.cpp
@@ -1784,6 +1784,12 @@
const LiveRange::Segment &S = *I;
const VNInfo *VNI = S.valno;
assert(VNI && "Live segment has no valno");
+
+ if(TargetRegisterInfo::isPhysicalRegister(Reg)) {
+ MCRegUnitRootIterator Roots(Reg, TRI);
+ if(isReserved(*Roots))
+ return;
+ }
if (VNI->id >= LR.getNumValNums() || VNI != LR.getValNumInfo(VNI->id)) {
report("Foreign valno in live segment", MF);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D35985.108611.patch
Type: text/x-patch
Size: 1383 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170728/cfeee462/attachment.bin>
More information about the llvm-commits
mailing list