[llvm-commits] Patch to implement UMLAL/SMLAL Instructions for the ARM Architecture

Evan Cheng evan.cheng at apple.com
Mon Sep 3 10:14:19 PDT 2012


LGTM
On Aug 27, 2012, at 8:00 AM, Arnold Schwaighofer wrote:

> On 8/12/2012 12:18 AM, Arnold Schwaighofer wrote:
> 
> > I reverted the patch in r161736. I'll investigate this on Monday.
> >
> > On Saturday, August 11, 2012, Michael Gottesman wrote:
> >
> >     This patch caused an execution correctness error for test
> >     MultiSource/Applications/JM/ldecod/ldecod. The specific error that
> >     occurs is that the output image differs from the expected result
> >     image beyond a certain tolerance. The error occurs on armv7 thumb
> >     O0 g and armv7 thumb O3.
> 
> I tracked this down to wrong thumb2 patterns.
> 
> The failing patch defined 4 output arguments.
> 
>> // Multiply + accumulate
>> -def t2SMLAL : T2MulLong<0b100, 0b0000,
>> -                  (outs rGPR:$RdLo, rGPR:$RdHi),
>> +def t2SMLAL : T2MlaLong<0b100, 0b0000,
>> +                  (outs rGPR:$RdLo, rGPR:$RdHi, rGPR:$RLo, rGPR:$RHi),
>>                   (ins rGPR:$Rn, rGPR:$Rm), IIC_iMAC64,
>> -                  "smlal", "\t$RdLo, $RdHi, $Rn, $Rm", []>;
>> +                  "smlal", "\t$RdLo, $RdHi, $Rn, $Rm", []>,
>> +                  RegConstraint<"$RLo = $RdLo, $RHi = $RdHi">;
> 
> Instead of 4 input arguments.
> 
>> // Multiply + accumulate
>> -def t2SMLAL : T2MulLong<0b100, 0b0000,
>> +def t2SMLAL : T2MlaLong<0b100, 0b0000,
>>                   (outs rGPR:$RdLo, rGPR:$RdHi),
>> -                  (ins rGPR:$Rn, rGPR:$Rm), IIC_iMAC64,
>> -                  "smlal", "\t$RdLo, $RdHi, $Rn, $Rm", []>;
>> +                  (ins rGPR:$Rn, rGPR:$Rm, rGPR:$RLo, rGPR:$RHi), IIC_iMAC64,
>> +                  "smlal", "\t$RdLo, $RdHi, $Rn, $Rm", []>,
>> +                  RegConstraint<"$RLo = $RdLo, $RHi = $RdHi">;
> 
> Find the corrected patch attached. I ran the tests-suite (cortex-a8, thumb2, O3) to make sure not to introduce any additional errors.
> 
> Okay to commit?
> 
> 
> 
> 
> 
> -- 
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum.
> <yinmas_mla5.patch>




More information about the llvm-commits mailing list