[llvm] [GlobalISel][LLT] Introduce FPInfo for LLT (Enable bfloat, ppc128float and others in GlobalISel) (PR #155107)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 28 10:55:10 PST 2026


================
@@ -36,6 +36,40 @@ LLT llvm::getLLTForType(Type &Ty, const DataLayout &DL) {
     // concerned.
     auto SizeInBits = DL.getTypeSizeInBits(&Ty);
     assert(SizeInBits != 0 && "invalid zero-sized type");
+
+    // Return simple scalar
+    if (!LLT::getUseExtended())
+      return LLT::scalar(SizeInBits);
+
+    // Choose more precise LLT variant
+    if (Ty.isFloatingPointTy()) {
+      if (Ty.isHalfTy())
----------------
arsenm wrote:

Switch over type ID?

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


More information about the llvm-commits mailing list