[PATCH] D121600: [Codegen][X86][XCore] Allow meta instruction to be target dependent

Kan Shengchen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 16 19:29:32 PDT 2022


skan added a comment.

In D121600#3388083 <https://reviews.llvm.org/D121600#3388083>, @craig.topper wrote:

> In D121600#3388072 <https://reviews.llvm.org/D121600#3388072>, @skan wrote:
>
>> In D121600#3388065 <https://reviews.llvm.org/D121600#3388065>, @craig.topper wrote:
>>
>>> If you’re fixing a bug shouldn’t there be a test?
>>
>> We have a unit test in MachineMetadata.cpp.
>
> Is that test doing anything more than checking that isMetaInstruction returns true for the test?

It only checks `isMetaInstruction` returns true for Int_MemBarrier.  There could be lots of bugs if `isMetaInstruction` returns `false` for an instruction that emits nothing executable. One of them is that the redundant dwarf debug location (llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp).
And unit test is the simplest way to check.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D121600



More information about the llvm-commits mailing list