akirilov-arm labeled issue #1539:
Right now, the
vcode
filetest matches the pretty-printed assembly with the filecheck directives. To test the new aarch64 backend, we've written a bunch of filetests that match against a golden compilation. This works for now, but is somewhat brittle: if regalloc heuristics change which registers are used, the tests need to be updated. In addition, it requires us to match the whole function body to ensure that nothing else was generated, when all we really want to do is to assert that a particular operation was implemented by only these N instructions. We should look into porting or building an equivalent of the old backend's "assert this instruction has this encoding" functionality, and its register constraints that make tests more robust.
alexcrichton closed issue #1539:
Right now, the
vcode
filetest matches the pretty-printed assembly with the filecheck directives. To test the new aarch64 backend, we've written a bunch of filetests that match against a golden compilation. This works for now, but is somewhat brittle: if regalloc heuristics change which registers are used, the tests need to be updated. In addition, it requires us to match the whole function body to ensure that nothing else was generated, when all we really want to do is to assert that a particular operation was implemented by only these N instructions. We should look into porting or building an equivalent of the old backend's "assert this instruction has this encoding" functionality, and its register constraints that make tests more robust.
Last updated: Dec 23 2024 at 12:05 UTC