[PATCH] [X86][SSE] Generalised unpackl/unpckh shuffle matching

Quentin Colombet qcolombet at apple.com
Mon Feb 16 11:44:20 PST 2015


Hi Simon,

LGTM, but Chandler may have a different opinion on the way of canonicalize this.

Thanks,
Quentin


REPOSITORY
  rL LLVM

================
Comment at: lib/Target/X86/X86ISelLowering.cpp:10763
@@ -10746,1 +10762,3 @@
       return DAG.getNode(X86ISD::UNPCKH, DL, MVT::v8f32, V1, V2);
+    if (isShuffleEquivalent(V1, V2, Mask, 8, 0, 9, 1, 12, 4, 13, 4))
+      return DAG.getNode(X86ISD::UNPCKL, DL, MVT::v8f32, V2, V1);
----------------
Shouldn’t the last number be 5?

================
Comment at: lib/Target/X86/X86ISelLowering.cpp:10863
@@ -10842,1 +10862,3 @@
       return DAG.getNode(X86ISD::UNPCKH, DL, MVT::v8i32, V1, V2);
+    if (isShuffleEquivalent(V1, V2, Mask, 8, 0, 9, 1, 12, 4, 13, 4))
+      return DAG.getNode(X86ISD::UNPCKL, DL, MVT::v8i32, V2, V1);
----------------
Ditto.

http://reviews.llvm.org/D7564

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






More information about the llvm-commits mailing list