This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [TESTCASE] AltiVec code uses wrong rtl expression


Daniel Egger wrote:
> 
> Hija,
> 
> 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/
vmrghX patterns.

Graham


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]