[PATCH] D150068: [X86][AsmParser] Refactor code in AsmParser

Alexander Kornienko via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 12 07:01:10 PDT 2023


alexfh added a comment.

In D150068#4337333 <https://reviews.llvm.org/D150068#4337333>, @skan wrote:

> In D150068#4337235 <https://reviews.llvm.org/D150068#4337235>, @alexfh wrote:
>
>> With -Os and -march=haswell the patch produces differences similar to this one:
>>
>>           vpsrldq $8, %xmm8, %xmm8                # xmm8 = xmm8[8,9,10,11,12,13,14,15],zero,zero,zero,zero,zero,zero,zero,zero
>>           vpxor   %xmm8, %xmm9, %xmm8
>>           vpsrldq $4, %xmm8, %xmm9                # xmm9 = xmm8[4,5,6,7,8,9,10,11,12,13,14,15],zero,zero,zero,zero
>>   -       vmovss  %xmm8, %xmm4, %xmm8             # xmm8 = xmm8[0],xmm4[1,2,3]
>>   +       vmovss  %xmm4, %xmm8, %xmm8             # xmm8 = xmm4[0],xmm8[1,2,3]
>>           vpclmulqdq      $0, %xmm8, %xmm5, %xmm8
>>           vpxor   %xmm9, %xmm8, %xmm8
>>   -       vmovss  %xmm8, %xmm4, %xmm9             # xmm9 = xmm8[0],xmm4[1,2,3]
>>   +       vmovss  %xmm4, %xmm8, %xmm9             # xmm9 = xmm4[0],xmm8[1,2,3]
>>           vpclmulqdq      $1, %xmm9, %xmm6, %xmm9
>>   -       vmovss  %xmm9, %xmm4, %xmm9             # xmm9 = xmm9[0],xmm4[1,2,3]
>>   +       vmovss  %xmm4, %xmm9, %xmm9             # xmm9 = xmm4[0],xmm9[1,2,3]
>>           vpclmulqdq      $0, %xmm9, %xmm7, %xmm9
>>           vpxor   %xmm9, %xmm8, %xmm8
>>           vpextrd $1, %xmm8, %ecx
>>
>> Looks wrong to me.
>
> I think I know what's the bug here and will prepare a patch to fix it soon.

The proposed fix (https://reviews.llvm.org/D150440) is a non-trivial change on its own, which might introduce more issues. I suggest to revert this commit to return the trunk to a good state and then get this patch reviewed together with the fix.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D150068



More information about the llvm-commits mailing list