[llvm-commits] [llvm] r97739 - /llvm/trunk/lib/Target/X86/X86FastISel.cpp
Jakob Stoklund Olesen
stoklund at 2pi.dk
Thu Mar 4 11:51:51 PST 2010
On Mar 4, 2010, at 11:48 AM, Chris Lattner wrote:
> Author: lattner
> Date: Thu Mar 4 13:48:19 2010
> New Revision: 97739
>
> URL: http://llvm.org/viewvc/llvm-project?rev=97739&view=rev
> Log:
> make gep matching in fastisel match the base of the gep as a
> register if it isn't possible to match the indexes *and* the base.
> This fixes some fast isel rejects of load instructions on oggenc.
>
> Modified:
> llvm/trunk/lib/Target/X86/X86FastISel.cpp
>
> Modified: llvm/trunk/lib/Target/X86/X86FastISel.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86FastISel.cpp?rev=97739&r1=97738&r2=97739&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/X86/X86FastISel.cpp (original)
> +++ llvm/trunk/lib/Target/X86/X86FastISel.cpp Thu Mar 4 13:48:19 2010
> @@ -425,10 +425,17 @@
> break;
> // Ok, the GEP indices were covered by constant-offset and scaled-index
> // addressing. Update the address state and move on to examining the base.
> + X86AddressMode SavedAM = AM;
llvm[3]: Compiling X86FastISel.cpp for Release build
/d/g/llvm/lib/Target/X86/X86FastISel.cpp: In member function 'bool<unnamed>::X86FastISel::X86SelectAddress(llvm::Value*, llvm::X86AddressMode&)':
/d/g/llvm/lib/Target/X86/X86FastISel.cpp:439: error: jump to label 'unsupported_gep'
/d/g/llvm/lib/Target/X86/X86FastISel.cpp:420: error: from here
/d/g/llvm/lib/Target/X86/X86FastISel.cpp:428: error: crosses initialization of 'llvm::X86AddressMode SavedAM'
> AM.IndexReg = IndexReg;
> AM.Scale = Scale;
> AM.Disp = (uint32_t)Disp;
> - return X86SelectAddress(U->getOperand(0), AM);
> + if (X86SelectAddress(U->getOperand(0), AM))
> + return true;
> +
> + // If we couldn't merge the sub value into this addr mode, revert back to
> + // our address and just match the value instead of completely failing.
> + AM = SavedAM;
> + break;
> unsupported_gep:
> // Ok, the GEP indices weren't all covered.
> break;
>
>
> _______________________________________________
> 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