[llvm] [RISCV][GISEL] legalize, regbankselect, and instruction-select for G_… (PR #73061)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 27 17:12:56 PST 2023


================
@@ -86,6 +86,10 @@ RISCVLegalizerInfo::RISCVLegalizerInfo(const RISCVSubtarget &ST) {
     unsigned BigTyIdx = Op == G_MERGE_VALUES ? 0 : 1;
     unsigned LitTyIdx = Op == G_MERGE_VALUES ? 1 : 0;
     getActionDefinitionsBuilder(Op)
+        .legalIf([=, &ST](const LegalityQuery &Query) -> bool {
+          return ST.hasStdExtD() && typeIs(LitTyIdx, s32)(Query) &&
----------------
topperc wrote:

I think this should only be legal for rv32?

https://github.com/llvm/llvm-project/pull/73061


More information about the llvm-commits mailing list