[llvm] r185191 - Fix an off-by-one error. Also make the code a little more explicit in what it
Chad Rosier
mcrosier at apple.com
Mon Jul 1 14:41:06 PDT 2013
Hi Duncan,
The associated test case is CodeGen/X86/3dnow-intrinsics.ll, which didn't require changing.
Chad
On Jun 28, 2013, at 1:31 PM, Duncan Sands <duncan.sands at gmail.com> wrote:
> Test case?
>
> Ciao, Duncan.
>
> On 28/06/13 20:57, Chad Rosier wrote:
>> Author: mcrosier
>> Date: Fri Jun 28 13:57:01 2013
>> New Revision: 185191
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=185191&view=rev
>> Log:
>> Fix an off-by-one error. Also make the code a little more explicit in what it
>> is trying to do.
>>
>> Modified:
>> llvm/trunk/lib/Target/X86/X86FloatingPoint.cpp
>>
>> Modified: llvm/trunk/lib/Target/X86/X86FloatingPoint.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86FloatingPoint.cpp?rev=185191&r1=185190&r2=185191&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/X86/X86FloatingPoint.cpp (original)
>> +++ llvm/trunk/lib/Target/X86/X86FloatingPoint.cpp Fri Jun 28 13:57:01 2013
>> @@ -115,9 +115,10 @@ namespace {
>> unsigned Mask = 0;
>> for (MachineBasicBlock::livein_iterator I = MBB->livein_begin(),
>> E = MBB->livein_end(); I != E; ++I) {
>> - unsigned Reg = *I - X86::FP0;
>> - if (Reg < 8)
>> - Mask |= 1 << Reg;
>> + unsigned Reg = *I;
>> + if (Reg < X86::FP0 || Reg > X86::FP6)
>> + continue;
>> + Mask |= 1 << (Reg - X86::FP0);
>> }
>> return Mask;
>> }
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>
>
> _______________________________________________
> 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