[PATCH] D56990: Bugfix for Replacement of tied operand of inline asm

Eli Friedman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 8 12:39:16 PST 2019


efriedma added a comment.

We expect that tests for clang IR generation should look something like clang/test/CodeGen/asm-inout.c.

Even though a test like that isn't directly testing the overall behavior, we try to separate tests of clang's behavior from tests of LLVM's behavior.  It gives better test coverage by ensuring that clang behaves the way we expect, and the LLVM backend behaves the way we expect.  This is important because clang isn't the only frontend that uses LLVM code generation.  Also, test written like that tend to be easier to read.

If you want to ensure the IR is eventually lowered correctly, you can add a second test to llvm/test/CodeGen/X86/, which essentially take the IR generated by clang, runs it through llc, and checks we get the expected result.  Maybe that test is worth adding here; we don't have very much test coverage for inline asm using MMX.


Repository:
  rC Clang

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

https://reviews.llvm.org/D56990





More information about the cfe-commits mailing list