Skip to content

Commit 467a0c3

Browse files
authored
[RISCV] Remove remapping Zfinx register classes to GPR class in getRegForInlineAsmConstraint. (#164352)
The codegen for Zfinx has been supported. So we don't need to remap Zfinx register classes to GPR class.
1 parent af6fa77 commit 467a0c3

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

llvm/lib/Target/RISCV/RISCVISelLowering.cpp

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24044,18 +24044,7 @@ RISCVTargetLowering::getRegForInlineAsmConstraint(const TargetRegisterInfo *TRI,
2404424044
}
2404524045
}
2404624046

24047-
std::pair<Register, const TargetRegisterClass *> Res =
24048-
TargetLowering::getRegForInlineAsmConstraint(TRI, Constraint, VT);
24049-
24050-
// If we picked one of the Zfinx register classes, remap it to the GPR class.
24051-
// FIXME: When Zfinx is supported in CodeGen this will need to take the
24052-
// Subtarget into account.
24053-
if (Res.second == &RISCV::GPRF16RegClass ||
24054-
Res.second == &RISCV::GPRF32RegClass ||
24055-
Res.second == &RISCV::GPRPairRegClass)
24056-
return std::make_pair(Res.first, &RISCV::GPRRegClass);
24057-
24058-
return Res;
24047+
return TargetLowering::getRegForInlineAsmConstraint(TRI, Constraint, VT);
2405924048
}
2406024049

2406124050
InlineAsm::ConstraintCode

0 commit comments

Comments
 (0)