[PATCH] D92645: [X86] Add X86ISD::SUBV_BROADCAST_LOAD and begin removing X86ISD::SUBV_BROADCAST (PR38969)

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 9 06:57:14 PST 2020


RKSimon added inline comments.


================
Comment at: llvm/test/CodeGen/X86/vector-trunc.ll:119
 ; AVX2-FAST:       # %bb.0: # %entry
-; AVX2-FAST-NEXT:    vmovaps {{.*#+}} xmm2 = [1,3,5,7]
+; AVX2-FAST-NEXT:    vbroadcastf128 {{.*#+}} ymm2 = [1,3,5,7,1,3,5,7]
+; AVX2-FAST-NEXT:    # ymm2 = mem[0,1,0,1]
----------------
pengfei wrote:
> Seems vmovaps better here.
Yes - I should have explained - LowerBUILD_VECTOR doesn't recognise undef upper elements until AFTER its tried lowerBuildVectorAsBroadcast, and because we have multiple uses SimplifyDemandedVectorElts won't touch it. 

I'll adjust LowerBUILD_VECTOR separately and update this patch.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D92645



More information about the llvm-commits mailing list