PTX: Fixup a case where getRegClassFor() should be used instead of custom code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141199 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Justin Holewinski 2011-10-05 18:32:25 +00:00
parent 2c3bef8a15
commit 591c1c6754

View File

@ -236,23 +236,7 @@ SDValue PTXTargetLowering::
else {
for (unsigned i = 0, e = Ins.size(); i != e; ++i) {
EVT RegVT = Ins[i].VT;
TargetRegisterClass* TRC = 0;
// Determine which register class we need
if (RegVT == MVT::i1)
TRC = PTX::RegPredRegisterClass;
else if (RegVT == MVT::i16)
TRC = PTX::RegI16RegisterClass;
else if (RegVT == MVT::i32)
TRC = PTX::RegI32RegisterClass;
else if (RegVT == MVT::i64)
TRC = PTX::RegI64RegisterClass;
else if (RegVT == MVT::f32)
TRC = PTX::RegF32RegisterClass;
else if (RegVT == MVT::f64)
TRC = PTX::RegF64RegisterClass;
else
llvm_unreachable("Unknown parameter type");
TargetRegisterClass* TRC = getRegClassFor(RegVT);
// Use a unique index in the instruction to prevent instruction folding.
// Yes, this is a hack.