Skip to content
Unverified Commit 67f9cd46 authored by Rik Huijzer's avatar Rik Huijzer Committed by GitHub
Browse files

[mlir][llvm] Fix verifier for const float (#74247)

Fixes one of the cases of
https://github.com/llvm/llvm-project/issues/56962.

This PR basically moves some code from
`mlir::LLVM::detail::getLLVMConstant`
([source](https://github.com/llvm/llvm-project/blob/9f78edbd20ed922cced9482f7791deb9899a6d82/mlir/lib/Target/LLVMIR/ModuleTranslation.cpp#L354-L371))
over to the verifier of `LLVM::ConstantOp`. For now, I focused just on
the case where the attribute is a float and ignored the integer case of
https://github.com/llvm/llvm-project/issues/56962. Note that without
this patch, both added tests will crash inside `getLLVMConstant` during
`mlir-translate -mlir-to-llvmir`.
parent 3406a2bc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment