[PATCH] D14761: [X86][SSE] Detect AVG pattern during instruction combine for SSE2/AVX2/AVX512BW.

Cong Hou via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 23 21:26:02 PST 2015


congh added a comment.

In http://reviews.llvm.org/D14761#295365, @RKSimon wrote:

> LGTM - one minor query and please can you alter a couple of test cases so the zext extends to something other than vXi32? (vXi16 and vXi64 I guess).


I have replaced many types in the test file with i16/i64.
Thank you very much for the review!


================
Comment at: lib/Target/X86/X86ISelLowering.cpp:25668-25669
@@ +25667,4 @@
+    SDValue Avg =
+        detectAVGPattern(St->getValue(), St->getMemoryVT(), DAG, Subtarget, dl);
+    if (Avg.getNode())
+      return DAG.getStore(St->getChain(), dl, Avg, St->getBasePtr(),
----------------
RKSimon wrote:
> Just to be certain - this can only be called for AVX512 truncate stores?
I am not sure if TruncatingStore can be generated for other platforms, but I think this is still valid other than AVX512. Let me know if I am wrong.


http://reviews.llvm.org/D14761





More information about the llvm-commits mailing list