[llvm-commits] AVX1 Code Generation - VSHUFP extension
Demikhovsky, Elena
elena.demikhovsky at intel.com
Wed Nov 9 06:41:50 PST 2011
Hi,
I fixed the comments, I put 2 functions isCommutedVSHUFP() together.
If this patch is good, please commit it.
Thank you.
- Elena
-----Original Message-----
From: Demikhovsky, Elena
Sent: Tuesday, November 08, 2011 16:46
To: 'Bruno Cardoso Lopes'
Cc: Eli Friedman; llvm-commits at cs.uiuc.edu
Subject: RE: [llvm-commits] AVX1 Code Generation - VSHUFP extension
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vshufp2.diff
Type: application/octet-stream
Size: 3073 bytes
Desc: vshufp2.diff
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20111109/c8c45ef0/attachment.obj>
More information about the llvm-commits
mailing list