[PATCH] D139682: [DAG] Stop replace masked compressstore with normal masked store

Xiang Zhang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 9 03:25:30 PST 2022


xiangzhangllvm added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:11034
   // truncating store.  We can do this even if this is already a masked
-  // truncstore.
+  // truncstore or a compress store.
   if ((Value.getOpcode() == ISD::TRUNCATE) && Value->hasOneUse() &&
----------------
pengfei wrote:
> Do you mean cannot be a compress store?
Yes, right


================
Comment at: llvm/test/CodeGen/X86/masked_compressstore_isel.ll:15-16
 ; CHECK-NEXT:    %3:vk16wm = VPMOVW2MZ128rr killed %2
-; CHECK-NEXT:    VPMOVDWZ256mrk $noreg, 1, $noreg, 0, $noreg, killed %3, %0 :: (store unknown-size into `i16* null`, align 16)
+; CHECK-NEXT:    %4:vr128x = VPMOVDWZ256rr %0
+; CHECK-NEXT:    VPCOMPRESSWZ128mrk $noreg, 1, $noreg, 0, $noreg, killed %3, killed %4 :: (store unknown-size into `i16* null`, align 16)
 ; CHECK-NEXT:    RET 0
----------------
pengfei wrote:
> Can we optimizate it to truncated `compressstore`?
Do we have truncated compressstore?
May be can implement by targets.
But for target independent code we can not directly transfer to normal masted store.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139682/new/

https://reviews.llvm.org/D139682



More information about the llvm-commits mailing list