[llvm] r195035 - R600/SI: Specify S_ADD/S_SUB set SCC and add is commutable

Matt Arsenault Matthew.Arsenault at amd.com
Mon Nov 18 12:28:40 PST 2013


On 11/18/2013 12:22 PM, Rafael EspĂ­ndola wrote:
> None of these changes are testable?
Most of these are fixes for problems that prevent the the add i64 
implementation from working. These should all be hit by the add test I 
added in one of them, but that test isn't currently enabled.

>
> On 18 November 2013 15:09, Matt Arsenault <Matthew.Arsenault at amd.com> wrote:
>> Author: arsenm
>> Date: Mon Nov 18 14:09:32 2013
>> New Revision: 195035
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=195035&view=rev
>> Log:
>> R600/SI: Specify S_ADD/S_SUB set SCC and add is commutable
>>
>> Modified:
>>      llvm/trunk/lib/Target/R600/SIInstructions.td
>>
>> Modified: llvm/trunk/lib/Target/R600/SIInstructions.td
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/SIInstructions.td?rev=195035&r1=195034&r2=195035&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/R600/SIInstructions.td (original)
>> +++ llvm/trunk/lib/Target/R600/SIInstructions.td Mon Nov 18 14:09:32 2013
>> @@ -1126,17 +1126,29 @@ def V_DIV_FMAS_F64 : VOP3_64 <0x00000170
>>   //def V_QSAD_U8 : VOP3_U8 <0x00000172, "V_QSAD_U8", []>;
>>   //def V_MQSAD_U8 : VOP3_U8 <0x00000173, "V_MQSAD_U8", []>;
>>   def V_TRIG_PREOP_F64 : VOP3_64 <0x00000174, "V_TRIG_PREOP_F64", []>;
>> +
>> +let Defs = [SCC] in { // Carry out goes to SCC
>> +let isCommutable = 1 in {
>>   def S_ADD_U32 : SOP2_32 <0x00000000, "S_ADD_U32", []>;
>> -def S_SUB_U32 : SOP2_32 <0x00000001, "S_SUB_U32", []>;
>>   def S_ADD_I32 : SOP2_32 <0x00000002, "S_ADD_I32",
>>     [(set i32:$dst, (add i32:$src0, i32:$src1))]
>>   >;
>> +} // End isCommutable = 1
>> +
>> +def S_SUB_U32 : SOP2_32 <0x00000001, "S_SUB_U32", []>;
>>   def S_SUB_I32 : SOP2_32 <0x00000003, "S_SUB_I32",
>>     [(set i32:$dst, (sub i32:$src0, i32:$src1))]
>>   >;
>>
>> +let Uses = [SCC] in { // Carry in comes from SCC
>> +let isCommutable = 1 in {
>>   def S_ADDC_U32 : SOP2_32 <0x00000004, "S_ADDC_U32", []>;
>> +} // End isCommutable = 1
>> +
>>   def S_SUBB_U32 : SOP2_32 <0x00000005, "S_SUBB_U32", []>;
>> +} // End Uses = [SCC]
>> +} // End Defs = [SCC]
>> +
>>   def S_MIN_I32 : SOP2_32 <0x00000006, "S_MIN_I32", []>;
>>   def S_MIN_U32 : SOP2_32 <0x00000007, "S_MIN_U32", []>;
>>   def S_MAX_I32 : SOP2_32 <0x00000008, "S_MAX_I32", []>;
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits






More information about the llvm-commits mailing list