This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [AVX]: Add some 265bit AVX patterns
On Thu, Apr 10, 2008 at 6:30 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
>
> On Thu, Apr 10, 2008 at 09:48:32AM +0200, Uros Bizjak wrote:
> > On Thu, Apr 10, 2008 at 7:51 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
> > >
> > > On Thu, Apr 10, 2008 at 07:27:17AM +0200, Uros Bizjak wrote:
> > > > Hello!
> > > >
> > > > > Index: gcc/config/i386/sse.md
> > > > > ===================================================================
> > > > > --- gcc/config/i386/sse.md (.../fsf/trunk) (revision 2097)
> > > > > +++ gcc/config/i386/sse.md (.../branches/avx) (revision 2097)
> > > >
> > > > What do you think about introducing avx.md instead of adding AVX
> > > > patterns to sse.md? IMO, avx.md will be growing in the future.
> > > >
> > >
> > > AVX is backward compatible with SSE. For each SSE intruction, there
> > > is an AVX version. Putting the AVX pattern before the corresponding
> > > SSE one in sse.md means we don't have to change any SSE patterns.
> > > Otherwise, we have to add !TARGET_AVX in every SSE pattern. I don't
> > > mind to do it this way if it is preferred.
> >
> > I need to think about this a bit, but IMO we should have only one
> > (macroized?) expander and one (macroized?) insn pattern that includes
> > various macros and SSE_FLOAT_MODE_P or AVX_FLOAT_MODE_P predicates.
> > Currently, we have shadowing patterns for SSE vs 387 math, and it is a
> > pain to maintain, especially when insn patterns are only partially
> > shadowed due to different insn operand predicates.
>
> I will take a look.
>
The problem is SSE patterns have
"nonimmediate_operand" "%0"
while AVX patterns have
"nonimmediate_operand" "%x"
I couldn't find a way to generate "%0" or "%x" based on TARGET_XXX.
H.J.