My thought is that we can directly select W instructions using s32.
This will likely require combines and other optimizations eventually,
but this makes a simple starting point.
I'm slowly prototyping a similar approach for SelectionDAG.
Paths
| Differential D157770
[RISCV][GISel] Make s32 a legal type for RV64 for any operation that has a W version. ClosedPublic Authored by craig.topper on Aug 11 2023, 7:58 PM.
Details Summary My thought is that we can directly select W instructions using s32. This will likely require combines and other optimizations eventually, I'm slowly prototyping a similar approach for SelectionDAG.
Diff Detail
Event TimelineComment Actions LGTM For context, Craig and I chatted about general directions here for a good while on Friday. This is not a high confidence statement that we'll definitely end up with i32 legal on RV64. It's instead a low confidence guess as to where SDAG will be in about a year. If it turns out we're wrong, we'll reverse direction and move GISEL towards the current model that SDAG is using. We're so far from O3 code quality on GISEL that we don't expect to hit the code quality questions in practice to well beyond that rough 1yr timeline. So basically, if you're looking at this later and think we went the wrong direction, it's entirely possible you're right. This revision is now accepted and ready to land.Aug 14 2023, 9:22 AM This revision was landed with ongoing or failed builds.Aug 19 2023, 11:21 AM Closed by commit rGb41e75c8a422: [RISCV][GISel] Make s32 a legal type for RV64 for any operation that has a W… (authored by craig.topper). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 551715 llvm/lib/Target/RISCV/GISel/RISCVLegalizerInfo.cpp
llvm/test/CodeGen/RISCV/GlobalISel/legalizer/rv32/legalize-ashr.mir
llvm/test/CodeGen/RISCV/GlobalISel/legalizer/rv32/legalize-div.mir
llvm/test/CodeGen/RISCV/GlobalISel/legalizer/rv32/legalize-icmp.mir
llvm/test/CodeGen/RISCV/GlobalISel/legalizer/rv32/legalize-rem.mir
llvm/test/CodeGen/RISCV/GlobalISel/legalizer/rv64/legalize-add.mir
llvm/test/CodeGen/RISCV/GlobalISel/legalizer/rv64/legalize-ashr.mir
llvm/test/CodeGen/RISCV/GlobalISel/legalizer/rv64/legalize-const.mir
llvm/test/CodeGen/RISCV/GlobalISel/legalizer/rv64/legalize-div.mir
llvm/test/CodeGen/RISCV/GlobalISel/legalizer/rv64/legalize-icmp.mir
llvm/test/CodeGen/RISCV/GlobalISel/legalizer/rv64/legalize-load.mir
llvm/test/CodeGen/RISCV/GlobalISel/legalizer/rv64/legalize-lshr.mir
llvm/test/CodeGen/RISCV/GlobalISel/legalizer/rv64/legalize-mul-ext.mir
llvm/test/CodeGen/RISCV/GlobalISel/legalizer/rv64/legalize-rem.mir
llvm/test/CodeGen/RISCV/GlobalISel/legalizer/rv64/legalize-shl.mir
llvm/test/CodeGen/RISCV/GlobalISel/legalizer/rv64/legalize-store.mir
llvm/test/CodeGen/RISCV/GlobalISel/legalizer/rv64/legalize-sub.mir
|
clang-format not found in user’s local PATH; not linting file.