[PATCH] D142797: [X86] Make `prefetchit{0/1}` emit an assembler warning if the operand is not rip-rel

Phoebe Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 27 19:51:53 PST 2023


pengfei added inline comments.


================
Comment at: llvm/test/CodeGen/X86/prefetchi-warning.ll:1
+; -filetype=obj as the warning is from the assembler
+; RUN: llc -filetype=obj -mtriple=x86_64-- -mattr=+prefetchi < %s 2>&1 | FileCheck %s
----------------
This seems miss a half use case. User may use gas rather than native assembler. Maybe move it to early pass? `X86InstrInfo::verifyInstruction` looks like an ideal place, but it is just for error check.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D142797



More information about the llvm-commits mailing list