[mlir] Fix Python bindings tests failure in Debug mode after D98474
Add extra `type.isa<FloatType>()` check to `FloatAttr::get(Type, double)` method. Otherwise it tries to call `type.cast<FloatType>()`, which fails with assertion in Debug mode. The `!type.isa<FloatType>()` case just redirercts the call to `FloatAttr::get(Type, APFloat)`, which will perform the actual check and emit appropriate error. Reviewed By: mehdi_amini Differential Revision: https://reviews.llvm.org/D98764
Loading
Please register or sign in to comment