diff options
author | Rik Huijzer <github@huijzer.xyz> | 2023-12-04 08:06:02 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-04 08:06:02 +0100 |
commit | 67f9cd46708e74aa65341b07eeefa4fe198d7a9e (patch) | |
tree | 0dcf3cca774b5b3d01cc2d6877c35cf87286cc4e /llvm/lib/CodeGen/MachineOperand.cpp | |
parent | 3406a2bc5ff71b2e395a28d4f65d177bafb60b9b (diff) | |
download | llvm-67f9cd46708e74aa65341b07eeefa4fe198d7a9e.zip llvm-67f9cd46708e74aa65341b07eeefa4fe198d7a9e.tar.gz llvm-67f9cd46708e74aa65341b07eeefa4fe198d7a9e.tar.bz2 |
[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`.
Diffstat (limited to 'llvm/lib/CodeGen/MachineOperand.cpp')
0 files changed, 0 insertions, 0 deletions