This is the mail archive of the
mailing list for the GCC project.
Re: [TESTCASE] AltiVec code uses wrong rtl expression
- From: Graham Stott <grahams at redhat dot com>
- To: Daniel Egger <degger at fhm dot edu>
- Cc: Aldy Hernandez <aldyh at redhat dot com>,GCC Developer Mailinglist <gcc at gcc dot gnu dot org>
- Date: Mon, 25 Feb 2002 23:22:20 +0000
- Subject: Re: [TESTCASE] AltiVec code uses wrong rtl expression
- References: <1014678747.3789.7.camel@sonja>
Daniel Egger wrote:
> I extended the last testcase a bit to figure out where the code
> is miscompiled and it turns out that gcc compiles all vec_mergel
> into vmrghh instead of vmrglh. I checked altivec.h as well as
> rs6000.[ch] but couldn't find the culprit; in altivec.h the correct
> builtin is substitued and in rs6000.[ch] is at least no obvious
> typo so it's probably somewhere deeper but I've not the slightest idea
> where as the rtl output isn't really clear to me.
It's generating vmrghh because the rtl patterns for altivec_vmrghh and
altivec_vrmghl are identical and so when it comes to match the generated
rtl against the md patterns it will always pick the 1st one in the md file
which is altivec_vmrghh.
If the patterns are correct then they probably need unspecs added so the
correct pattern gets matched. This is probably true of the other vmrglX/