[PATCH] D151863: [x86][MC] Fix movdir64b addressing

Kan Shengchen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 31 23:58:23 PDT 2023


skan added a comment.

In D151863#4386382 <https://reviews.llvm.org/D151863#4386382>, @akshaykhadse wrote:

> I am unable to write a .s or .ll test for this issue. The test has to be a end-to-end test, but I don't know how. Basically, `__asm movdir64b rax, ZMMWORD PTR [arr]` written in a .c file gets incorrectly translated to `call void asm sideeffect inteldialect "movdir64b rax, ZMMWORD PTR arr", "~{dirflag},~{fpsr},~{flags}"() #1, !srcloc !6` in the IR. The correct reanslation should be `call void asm sideeffect inteldialect "movdir64b rax, ZMMWORD PTR $0", "*m,~{flags},~{dirflag},~{fpsr},~{flags}"(ptr elementtype([1000 x i32]) %arr) #1, !srcloc !6`

You can write a CFE test as you described (C->IR)and then add a codegen test(IR -> ASM). Not have to be end-to-end.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D151863



More information about the llvm-commits mailing list