[PATCH] [X86][AVX] Fix wrong lowering of v4x64 shuffles into concat_vector plus extract_subvector nodes.

Andrea Di Biagio Andrea_DiBiagio at sn.scee.net
Fri Mar 13 04:28:33 PDT 2015


Hi Quentin,


================
Comment at: lib/Target/X86/X86ISelLowering.cpp:9025
@@ -9024,3 +9024,3 @@
   if (isShuffleEquivalent(V1, V2, Mask, {0, 1, 0, 1}) ||
       isShuffleEquivalent(V1, V2, Mask, {0, 1, 4, 5})) {
     SDValue LoV = DAG.getNode(ISD::EXTRACT_SUBVECTOR, DL, SubVT, V1,
----------------
qcolombet wrote:
> I think it would be clearer to do something like:
> bool UseOnlyV1 = isShuffleEquivalent(V1, V2, Mask, {0, 1, 0, 1});
> if (UseOnlyV1 || isShuffleEquivalent(V1, V2, Mask, {0, 1, 4, 5})) {
> <...>
>  SDValue HiV = DAG.getNode(ISD::EXTRACT_SUBVECTOR, DL, SubVT,
>                                                  UseOnlyV1 ? V1 : V2, DAG.getIntPtrConstant(0));
> <...>
> }
You are right. It would be a better fix in general. Thanks for the suggestion!
I am going to upload a new version of the patch soon.

http://reviews.llvm.org/D8259

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list