[PATCH] D151863: [x86][MC] Fix movdir64b addressing
Akshay Khadse via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 4 22:57:37 PDT 2023
akshaykhadse added inline comments.
================
Comment at: llvm/test/MC/X86/x86-64-movdir64b-intel.s:1
+// RUN: llvm-mc -triple x86_64-unknown-unknown -x86-asm-syntax=intel -output-asm-variant=1 --show-encoding %s | FileCheck %s
+// CHECK: movdir64b rax, zmmword ptr [rax - 4096]
----------------
skan wrote:
> The test can pass w/o this patch. I think we should replace it with IR test (llc) here, the input should be the diff in ms-inline-asm-64.c.
It is better to remove this as it does not add any value.
We cannot write a llc test for this because:
- If input IR is `call ... "movdir64b eax, ZMMWORD PTR arr ..."`, the generated assembly will be `movdir64b arr, %rax"
- If input IR is `call ... "movdir64b eax, ZMMWORD PTR $0 ..."`, the generated assembly will be `movdir64b -4016(%rbp), %rax"
In other words, it's responsibility of front-end to generate the correct IR. If the IR is not correct, the back-end will not fix it and incorrect assembly will be generated.
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