[llvm] [RISCV] Implement RISCVTTIImpl::getPreferredAddressingMode for HasVendorXCVmem (PR #120533)

Pengcheng Wang via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 19 19:33:36 PST 2024


wangpc-pp wrote:

> I am not very happy with it and am happy about any feedback on how to make the test more compact / less flaky.

@PhilippvK I want to share a method that I learnt from the community: you can add an `assert("catch you!")` to the place you care about, for example, the code that applys some optimizations, the code that selects your instructions, etc. And then you can use `llvm-reduce` to reduce your test via grepping the assertion.

As for your case, I think you can add an assertion here?
https://github.com/llvm/llvm-project/blob/d6e8ab1fa6a7a08d77c4c663ee494449b4b88bcd/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp#L1569-L1628

https://github.com/llvm/llvm-project/pull/120533


More information about the llvm-commits mailing list