[Mlir-commits] [mlir] [mlir][LLVMIR] Extend FP array-splat constant lowering (PR #192378)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Mon Apr 20 03:18:52 PDT 2026
================
@@ -683,6 +682,26 @@ llvm::Constant *mlir::LLVM::detail::getLLVMConstant(
}
}
}
+ if (elementType->isFloatingPointTy()) {
+ if (llvm::ConstantFP *cfp = dyn_cast<llvm::ConstantFP>(child)) {
+ APInt bitPattern = cfp->getValueAPF().bitcastToAPInt();
+ uint64_t value = bitPattern.getZExtValue();
+ // TODO: This code only handles 16, 32, and 64 bit floats. Handle
----------------
zackc6 wrote:
I didn’t find corresponding apis, either.
I think there fp8 and fp4 support is not so mature (comparing to f32) in the code base. That’s why I left TODO here.
https://github.com/llvm/llvm-project/pull/192378
More information about the Mlir-commits
mailing list