[llvm-commits] [llvm] r142429 - /llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp

Eli Friedman eli.friedman at gmail.com
Tue Oct 18 15:25:33 PDT 2011


On Tue, Oct 18, 2011 at 2:55 PM, Bill Wendling <isanbard at gmail.com> wrote:
> Author: void
> Date: Tue Oct 18 16:55:58 2011
> New Revision: 142429
>
> URL: http://llvm.org/viewvc/llvm-project?rev=142429&view=rev
> Log:
> The immediate may be too large for the CMP instruction. Move it into a register
> and use that in the CMP.
> <rdar://problem/10305266>
>
> Modified:
>    llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp
>
> Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp?rev=142429&r1=142428&r2=142429&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp (original)
> +++ llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp Tue Oct 18 16:55:58 2011
> @@ -5760,29 +5760,34 @@
>                    .addFrameIndex(FI)
>                    .addImm(4)
>                    .addMemOperand(FIMMOLd));
> -    AddDefaultPred(BuildMI(DispatchBB, dl, TII->get(ARM::t2CMPri))
> -                   .addReg(NewVReg1)
> +
> +    unsigned NewVReg2 = MRI->createVirtualRegister(TRC);
> +    AddDefaultPred(BuildMI(DispatchBB, dl, TII->get(ARM::t2MOVi16), NewVReg2)
>                    .addImm(LPadList.size()));

Are you sure LPadList.size() will always fit into the immdiate field
of t2MOVi16?

-Eli




More information about the llvm-commits mailing list