[all-commits] [llvm/llvm-project] 67f9cd: [mlir][llvm] Fix verifier for const float (#74247)
Rik Huijzer via All-commits
all-commits at lists.llvm.org
Sun Dec 3 23:06:15 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 67f9cd46708e74aa65341b07eeefa4fe198d7a9e
https://github.com/llvm/llvm-project/commit/67f9cd46708e74aa65341b07eeefa4fe198d7a9e
Author: Rik Huijzer <github at huijzer.xyz>
Date: 2023-12-04 (Mon, 04 Dec 2023)
Changed paths:
M mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
M mlir/test/Target/LLVMIR/llvmir-invalid.mlir
M mlir/test/Target/LLVMIR/llvmir.mlir
Log Message:
-----------
[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`.
More information about the All-commits
mailing list