This patch focuses on power of 2 bytes up to 2x XLen with and without alignment. Other cases will be handled in future patches.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
I only implememented what was required to legalize a misaligned access or a load that needs to be narrowed. So I only marked the legal cases which are covered by the tests.
Conplete support will be a different patch.
llvm/test/CodeGen/RISCV/GlobalISel/legalizer/rv32/legalize-load.mir | ||
---|---|---|
7 | Do we need the LLVM IR to specify the alignment here? Other RISCV legalizer tests don't have the LLVM IR, so I'm wondering if we can get rid of it. | |
54 | Perhaps we could use a test for i7? It tests that we can legalize loads for odd sizes. |
llvm/test/CodeGen/RISCV/GlobalISel/legalizer/rv32/legalize-load.mir | ||
---|---|---|
7 | Did someone ask for the IR to be removed in other legalizer tests or is just something we started doing without discussion? | |
54 | I'm going to keep odd sizes for later. I need to figure out more about hooks like lowerIfMemSizeNotByteSizePow2 and unsupportedIfMemSizeNotPow2 |
Perhaps we want to remove the llvm IR from the tests, but since that's not a functional change, LGTM.
llvm/test/CodeGen/RISCV/GlobalISel/legalizer/rv32/legalize-load.mir | ||
---|---|---|
7 | I believe @arsenm asked for it to be removed on Lewis' original patches. https://reviews.llvm.org/D76354#inline-1124225 |
llvm/test/CodeGen/RISCV/GlobalISel/legalizer/rv32/legalize-load.mir | ||
---|---|---|
7 | The IR section is pure noise in nearly all situations, especially legalizer tests. It's an infrastructure failing that it gets printed at all in most situations |
Do we need the LLVM IR to specify the alignment here? Other RISCV legalizer tests don't have the LLVM IR, so I'm wondering if we can get rid of it.