[PATCH] D131954: [LoongArch] Support Load and Store with 14-bit signed immediate operands

Lu Weining via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 17 19:56:09 PDT 2022


SixWeining added a comment.

In D131954#3730927 <https://reviews.llvm.org/D131954#3730927>, @xen0n wrote:

> In general you should name the testcases after your intent. For example for the `getelementptr ..., 255` case it's evident you want to check `{ld,st}ptr` is not emitted for misaligned offsets, and for `getelementptr ..., 4096` case you seem to be checking `{ld,st}ptr` is not emitted for out-of-range offsets. So names like `ldptr_w`, `ldptr_w_misaligned_offset` or `ldptr_w_too_big_offset` could be better conveying the intent.

For `getelementptr ..., 255`, the offset is not `255` but `2040`. It's also 4-bytes aligned. The reason why `{ld,st}ptr` is not generated is that `{ld,st}` is selected by codegen prior to `{ld,st}ptr` (maybe because the `Pats` for `{ld,st}` are defined before the `Pats` for `{ld,st}ptr`). `AddedComplexity` may change patterns' matching order.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D131954



More information about the llvm-commits mailing list