[llvm-commits] AVX1 Code Generation - VSHUFP extension

Demikhovsky, Elena elena.demikhovsky at intel.com
Tue Nov 8 06:46:01 PST 2011


3) I tried to make my code similar to existing. 

if I put one function the code will look like:

  if (!V2IsUndef && isCommutedVSHUFP(M, VT, Subtarget)) {
    SVOp = cast<ShuffleVectorSDNode>(CommuteVectorShuffle(SVOp, DAG));
    V1 = SVOp->getOperand(0);
    V2 = SVOp->getOperand(1);
    unsigned TargetMask = (VT.getVectorNumElements() == 8) ? 
             getShuffleVSHUFPSYImmediate(SVOp): getShuffleVSHUFPDYImmediate(SVOp);
    return getTargetShuffleNode(getSHUFPOpcode(VT), dl, VT, V1, V2,
                                  TargetMask, DAG);
  }

- Elena

-----Original Message-----
From: Bruno Cardoso Lopes [mailto:bruno.cardoso at gmail.com] 
Sent: Tuesday, November 08, 2011 15:21
To: Demikhovsky, Elena
Cc: Eli Friedman; llvm-commits at cs.uiuc.edu
Subject: Re: [llvm-commits] AVX1 Code Generation - VSHUFP extension

Hi Elena,

> I fixed the code. The input mask remains unchanged now.
> Please take a look.

A couple more comments:
1) Please change the comments to use "//" instead of "/**/".
2) Your patch is broken: contains the diff of the same file more than once.
3) No need to have 2 isCommutedVSHUFP*. Just have one function and
check "ps" or "pd" using the number of elements using
VT.getVectorNumElements() - but make sure to still check for 256-bits.
4) Why don't match when V2IsUndef? I suppose it's because you want the
shuffle to be xformed to a "extract of the low part"+128_bit-shuffle
later. If that's the case, add a comment saying that!

Thanks

-- 
Bruno Cardoso Lopes
http://www.brunocardoso.cc
---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.





More information about the llvm-commits mailing list