[LLVMdev] LLVM 2.8 and MMX

Nicolas Capens nicolas.capens at gmail.com
Tue Sep 21 20:30:43 PDT 2010


Hi Bill,

I'm currently focusing on 112804 and it definitely results in a performance
regression.

If I understand the comment correctly, it is intended to remove a case that
should never be hit. However, when I check for isUNPCKL_v_undef_Mask(SVOp)
below it my code does hit it. In particular it happens when I generate
"shufflevector <8 x i8> %v1, <8 x i8> %v1, undef, {0, 8, 1, 9, 2, 10, 3,
11}". This used to lower to UNPCKLBW but with revision 112804 it becomes a
bunch of byte moves.

Also note that this change doesn't appear to improve SSE code generation.
I'll look at whether the other patches could also be reverted to fix MMX
performance without hurting SSE...

Cheers,

Nicolas


-----Original Message-----
From: Bill Wendling [mailto:wendling at apple.com] 
Sent: Tuesday, September 21, 2010 23:37
To: Nicolas Capens
Cc: 'Chris Lattner'; 'Eli Friedman'; llvmdev at cs.uiuc.edu
Subject: Re: [LLVMdev] LLVM 2.8 and MMX

On Sep 21, 2010, at 10:23 AM, Nicolas Capens wrote:

> Hi all,
> 
> Sorry for the late reply. I got sidetracked by other fun projects. ;-)
> 
> I found that the performance regression is caused by revisions 112804,
> 112805 and 112806. Those changes were made 2 days prior to the 2.8
> branching, so it may have not been the intention to include them there?
> Either way they make my vector-intensive code two times slower so it would
> be much appreciated to revert these changes for the 2.8 release.
> 
Hi Nicolas,

Are you able to narrow it down to one of those patches? From the comments,
112804 and 112805 seem fairly innocuous:

------------------------------------------------------------------------
r112805 | bruno | 2010-09-01 21:20:26 -0700 (Wed, 01 Sep 2010) | 1 line

Move condition out to prepare for more matching
------------------------------------------------------------------------
r112804 | bruno | 2010-09-01 20:57:58 -0700 (Wed, 01 Sep 2010) | 1 line

Remove checking for isUNPCKL_v_undef_Mask, the specific node is already
emitted for it
------------------------------------------------------------------------

This one maybe caused the MMX regression?

------------------------------------------------------------------------
r112806 | bruno | 2010-09-01 22:23:12 -0700 (Wed, 01 Sep 2010) | 1 line

Replace unpckl_undef and unpckh_undef matching with target specific opcodes
------------------------------------------------------------------------

If you can narrow it down, file a bug report, and if it doesn't cause a
regression from 2.7 in other areas of the compiler, then we can make a
determination on whether to remove the offending commit from 2.8.

Thanks!
-bw





More information about the llvm-dev mailing list