[llvm] f1d1746 - [M68K][GlobalISel] Remove dependency on legal ruleset (#207614)

via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 5 14:45:21 PDT 2026


Author: David Green
Date: 2026-07-05T22:45:16+01:00
New Revision: f1d1746c4df9401667574c14a66cdfcb428b2cb6

URL: https://github.com/llvm/llvm-project/commit/f1d1746c4df9401667574c14a66cdfcb428b2cb6
DIFF: https://github.com/llvm/llvm-project/commit/f1d1746c4df9401667574c14a66cdfcb428b2cb6.diff

LOG: [M68K][GlobalISel] Remove dependency on legal ruleset (#207614)

This fills in always legal rules, to remove the dependency on the legacy
ruleset. This is not guaranteed to be all the rules, just the ones that
appear
in tests.

See #197308

Added: 
    

Modified: 
    llvm/lib/Target/M68k/GISel/M68kLegalizerInfo.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/M68k/GISel/M68kLegalizerInfo.cpp b/llvm/lib/Target/M68k/GISel/M68kLegalizerInfo.cpp
index 6e712c3825d50..d6f951c26acd4 100644
--- a/llvm/lib/Target/M68k/GISel/M68kLegalizerInfo.cpp
+++ b/llvm/lib/Target/M68k/GISel/M68kLegalizerInfo.cpp
@@ -47,4 +47,6 @@ M68kLegalizerInfo::M68kLegalizerInfo(const M68kSubtarget &ST) {
       .clampScalar(0, s8, s32);
 
   getActionDefinitionsBuilder(G_PTR_ADD).legalFor({{p0, s32}});
+
+  getActionDefinitionsBuilder(G_TRUNC).alwaysLegal();
 }


        


More information about the llvm-commits mailing list