[llvm] [GlobalISel][LLT] Introduce FPInfo for LLT (Enable bfloat, ppc128float and others in GlobalISel) (PR #155107)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 27 12:54:43 PST 2025
================
@@ -23,6 +24,11 @@ STATISTIC(NumPatternEmitted, "Number of patterns emitted");
using namespace llvm;
using namespace gi;
+static cl::opt<bool>
+ AllowExtendedLLT("gisel-extended-llt",
----------------
DenisGZM wrote:
That's correct.
Once you want to enable extended LLT:
1) Enable it in your TargetOptions (TargetOptions::EnableGlobalISelExtendedLLT), so IRTranslator will translate instruction using new LLT. There is test `llvm/unittests/CodeGen/GlobalISel/IRTranslatorBF16Test.cpp` showing how setup is handled.
2) Provide extra flag `-gisel-extended-llt` for match table emitter in your target's CMakeLists, so it generate matching tables also using new LLT's. Test `llvm/test/TableGen/GlobalISelEmitter/GlobalISelEmitter.td` using extra flag to produce new match tables.
Demonstrating how this works in the real target now requires a considerable amount of work for the target maintainer and much more for those who are not familiar with it. It would really be worse if it was done by someone from the outside. And I guess that's why all previous attempts to land similar functionality were abandoned.
As we discussed here, there are some problems in MatchTableEmitter when trying to support new mechanics: https://github.com/llvm/llvm-project/pull/155107#issuecomment-3536492205
https://github.com/llvm/llvm-project/pull/155107
More information about the llvm-commits
mailing list