[PATCH] D64551: [X86] EltsFromConsecutiveLoads - support common source loads
Bing Yu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 4 23:02:10 PDT 2019
yubing added a comment.
I've submit a patch to solve the bug which I commented yesterday.
https://reviews.llvm.org/D67210
================
Comment at: llvm/trunk/test/CodeGen/X86/load-partial.ll:64
; AVX: # %bb.0:
-; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
-; AVX-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0,1],mem[0],xmm0[3]
+; AVX-NEXT: vmovups (%rdi), %xmm0
; AVX-NEXT: retq
----------------
This is also not correct, according to IR.
================
Comment at: llvm/trunk/test/CodeGen/X86/load-partial.ll:86
; AVX: # %bb.0:
-; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
-; AVX-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0],mem[0],xmm0[2,3]
-; AVX-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0,1],mem[0],xmm0[3]
+; AVX-NEXT: vmovaps (%rdi), %xmm0
; AVX-NEXT: retq
----------------
This is not correct, since we are moving 3 float numbers to %xmm0, according to IR, instead of 4 float.
Before your patch, the testcase's CHECK is correct:
; AVX: # %bb.0:
; AVX-NEXT: vmovss (%rdi), %xmm0 # xmm0 = mem[0],zero,zero,zero
; AVX-NEXT: vinsertps $16, 4(%rdi), %xmm0, %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[2,3]
; AVX-NEXT: vinsertps $32, 8(%rdi), %xmm0, %xmm0 # xmm0 = xmm0[0,1],mem[0],xmm0[3]
; AVX-NEXT: retq
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D64551/new/
https://reviews.llvm.org/D64551
More information about the llvm-commits
mailing list