[llvm] r185191 - Fix an off-by-one error. Also make the code a little more explicit in what it
Duncan Sands
duncan.sands at gmail.com
Fri Jun 28 13:31:32 PDT 2013
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
>
More information about the llvm-commits
mailing list