Skip to content

Commit 9247a2c

Browse files
committed
guard against non-virtual registers
1 parent bbca78f commit 9247a2c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

llvm/lib/CodeGen/GlobalISel/GISelValueTracking.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -693,6 +693,9 @@ static bool outputDenormalIsIEEEOrPosZero(const MachineFunction &MF, LLT Ty) {
693693
void GISelValueTracking::computeKnownFPClass(Register R, KnownFPClass &Known,
694694
FPClassTest InterestedClasses,
695695
unsigned Depth) {
696+
if (!R.isVirtual())
697+
return;
698+
696699
LLT Ty = MRI.getType(R);
697700
APInt DemandedElts =
698701
Ty.isFixedVector() ? APInt::getAllOnes(Ty.getNumElements()) : APInt(1, 1);
@@ -736,6 +739,9 @@ void GISelValueTracking::computeKnownFPClass(Register R,
736739

737740
assert(Depth <= MaxAnalysisRecursionDepth && "Limit Search Depth");
738741

742+
if (!R.isVirtual())
743+
return;
744+
739745
MachineInstr &MI = *MRI.getVRegDef(R);
740746
unsigned Opcode = MI.getOpcode();
741747
LLT DstTy = MRI.getType(R);

0 commit comments

Comments
 (0)