[PATCH] D147243: [X86] MatchVectorAllZeroTest - add support for icmp(bitcast(icmp_ne(X,Y)),0) vector reduction patterns

Noah Goldstein via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 31 09:04:12 PDT 2023


goldstein.w.n added inline comments.


================
Comment at: llvm/test/CodeGen/X86/vector-reduce-or-cmp.ll:1031
+; AVX2-NEXT:    vpbroadcastd {{.*#+}} xmm1 = [15,15,15,15]
+; AVX2-NEXT:    vptest %xmm1, %xmm0
 ; AVX2-NEXT:    sete %al
----------------
RKSimon wrote:
> pengfei wrote:
> > goldstein.w.n wrote:
> > > why doesn't this micro-fuse anymore? Likewise below.
> > I found broadcast change in several places. It increases code size but reduces data size. I'm not sure which one is better.
> I'd dearly like to move most of the constant build vector data lowering out of DAG as it makes far too many premature judgements.
> 
> We could just lower it to a regular constant pool if we have to (keeping it as BUILD_VECTOR nodes would be even better like we do zero/allones) - and leave a later pass to judge whether we should make it a load/broadcast/extend/etc. depending on uses, folding, register pressure etc. We could even materialize some easy uniform constants (e.g. shifted masks + gfni) in code.
Agreed!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D147243



More information about the llvm-commits mailing list