[PATCH] D79689: [RISCV][NFC] Add tests for folds of ADDIs into load/stores

Luís Marques via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 11 13:28:55 PDT 2020


luismarques marked an inline comment as done.
luismarques added inline comments.


================
Comment at: llvm/test/CodeGen/RISCV/fold-addi-loadstore.ll:135
+
+define void @store_g_4() nounwind {
+; RV32I-LABEL: store_g_4:
----------------
lenary wrote:
> I realise the code is the same, but it would be good to have tests for store to `g_0`, `g_1`, `g_2` as well.
I tried to strike a balance between good coverage of the conceptual issue and too much repetition. It seemed like it was enough for one of the test types (loads) to thoroughly test all of the relevant offsets, while the other test types (stores, etc.) could focus on the boundary conditions, with one test where the fold shouldn't happen and one where it should. But I can include all of the combinations if you think that's beneficial for the patch.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D79689





More information about the llvm-commits mailing list