[llvm-commits] [llvm] r170669 - /llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp
reed kotler
rkotler at mips.com
Thu Dec 20 17:10:03 PST 2012
On 12/20/2012 10:16 AM, Jakob Stoklund Olesen wrote:
> On Dec 19, 2012, at 10:06 PM, Reed Kotler <rkotler at mips.com> wrote:
>
>> Author: rkotler
>> Date: Thu Dec 20 00:06:35 2012
>> New Revision: 170669
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=170669&view=rev
>> Log:
>> set register class properly for mips16 here
>>
>>
>> Modified:
>> llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp
>>
>> Modified: llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp?rev=170669&r1=170668&r2=170669&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp (original)
>> +++ llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp Thu Dec 20 00:06:35 2012
>> @@ -3099,7 +3099,8 @@
>> const TargetRegisterClass *RC;
>>
>> if (RegVT == MVT::i32)
>> - RC = &Mips::CPURegsRegClass;
>> + RC = Subtarget->inMips16Mode()? &Mips::CPU16RegsRegClass :
>> + &Mips::CPURegsRegClass;
>> else if (RegVT == MVT::i64)
>> RC = &Mips::CPU64RegsRegClass;
>> else if (RegVT == MVT::f32)
> Could you just use getRegClassFor(RegVT) instead of this switch on types?
>
> /jakob
>
I will take a look at this.
Thanks.
More information about the llvm-commits
mailing list