From 1e1832e821e7001ea26e8e47a84c9bff6071e0bd Mon Sep 17 00:00:00 2001 From: Adrian Kuegel Date: Mon, 4 Mar 2024 01:47:44 -0800 Subject: [PATCH] Fix convert and bitcast-convert for unsigned types. Also fix ClampIndex function to handle unsigned dynamic indices. Finally also convert to signless in ProvideParameter(). This allows to enable support for unsigned ops. PiperOrigin-RevId: 612362148 --- mhlo/transforms/map_mhlo_to_scalar_op.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/mhlo/transforms/map_mhlo_to_scalar_op.h b/mhlo/transforms/map_mhlo_to_scalar_op.h index f724059ff..f722f43dc 100644 --- a/mhlo/transforms/map_mhlo_to_scalar_op.h +++ b/mhlo/transforms/map_mhlo_to_scalar_op.h @@ -1339,6 +1339,15 @@ struct MhloOpToStdScalarOp { return impl::mapMhloOpToStdScalarOp(loc, resultTypes, argTypes, adaptor, b); } + + static Value mapConvertOpToStdScalarOp(Location loc, + ArrayRef targetTypes, + ArrayRef resultTypes, + ArrayRef argTypes, + ValueRange args, OpBuilder* b) { + return impl::mapConvertOpToStdScalarOp(loc, targetTypes, resultTypes, + argTypes, args, b); + } }; } // namespace mhlo