[PATCH] D41949: [RISCV] implement li pseudo instruction

Alex Bradbury via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 18 14:01:17 PDT 2018


asb added a comment.

In the end I decided to temporarily revert this patch. I've committed patches that fill in the holes identified in testing, and added the straight-forward patch for imm32 with lo12=0.

- Better tests for imm32_hi20_only (https://reviews.llvm.org/rL330274)
- Improved testing of the codegen -> compression codepath (https://reviews.llvm.org/rL330288)
- Test for constant subexpression elimination when materialising immediates (https://reviews.llvm.org/rL330291)
- Add pattern for immediates with zero for the lower 12 bits (https://reviews.llvm.org/rL330293)

I think the best path forwards for this patch is to start by getting a version of it landed that only adds support in the MC layer for li. Would you be happy to make that change Mario? Apologies for the hassle.

As you say, it would be good to share logic between MC and codegen for materialising constants, especially the more complex logic for 64-bit constants. But let's get the MC bit landed and then we can revisit.

Thank you Mario for all of your work on this, and thanks Ana and Sameer fo the feedback.


Repository:
  rL LLVM

https://reviews.llvm.org/D41949





More information about the llvm-commits mailing list