[all-commits] [llvm/llvm-project] 0b3d1a: [RISCV][test] Add tests for RISCVInstrInfo::descri...

Alex Bradbury via All-commits all-commits at lists.llvm.org
Tue Jan 2 05:36:07 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0b3d1a0b1bea12846c34adfdd19c8d7f930620ea
      https://github.com/llvm/llvm-project/commit/0b3d1a0b1bea12846c34adfdd19c8d7f930620ea
  Author: Alex Bradbury <asb at igalia.com>
  Date:   2024-01-02 (Tue, 02 Jan 2024)

  Changed paths:
    M llvm/unittests/Target/RISCV/RISCVInstrInfoTest.cpp

  Log Message:
  -----------
  [RISCV][test] Add tests for RISCVInstrInfo::describeLoadedValue (#76041)

Tests are in preparation for adding handling of the load of a constant
value as Mips does (noted in

<https://github.com/llvm/llvm-project/pull/72356#discussion_r1395203532>).

I've opted to implement these tests as a C++ unit test as on balance I
_think_ it's easier to follow and maintain than .mir tests trying to
indirectly test this function. That said, you see the limitations with
the test of describeLoadedValue on a memory operation where we'd rather
pass `MachinePointerInfo::getFixedStack` but can't because we'd need to
then ensure the necessary stack metadata for the function is present.




More information about the All-commits mailing list