[PATCH] D55898: [x86] add movddup specialization for build vector lowering (PR37502)

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 20 04:40:49 PST 2018


RKSimon added a comment.

I tried to do something more general back on D31373 <https://reviews.llvm.org/D31373>/rL299387 <https://reviews.llvm.org/rL299387> "[X86][SSE]] Lower BUILD_VECTOR with repeated elts as BUILD_VECTOR + VECTOR_SHUFFLE" - but that caused infinite loops (PR32558) and had to be reverted at rL299720 <https://reviews.llvm.org/rL299720> - we should probably revisit that.



================
Comment at: test/CodeGen/X86/build-vector-128.ll:530
 ; SSE41-32-NEXT:    movsd {{.*#+}} xmm0 = mem[0],zero
-; SSE41-32-NEXT:    insertps {{.*#+}} xmm0 = xmm0[0,1],mem[0],xmm0[3]
-; SSE41-32-NEXT:    insertps {{.*#+}} xmm0 = xmm0[0,1,2],mem[0]
+; SSE41-32-NEXT:    movddup {{.*#+}} xmm0 = xmm0[0,0]
 ; SSE41-32-NEXT:    retl
----------------
Why didn't this fold the load?


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

https://reviews.llvm.org/D55898





More information about the llvm-commits mailing list