fix(compiler): Suppress various warnings about expressions with different signedness

This commit is contained in:
Andi Drebes
2021-11-15 10:53:05 +01:00
committed by Quentin Bourgerie
parent ec8387843b
commit ffe32f5e90
3 changed files with 5 additions and 5 deletions

View File

@@ -19,7 +19,7 @@ struct GenericTypeConverterPattern : public mlir::OpRewritePattern<Op> {
rewriter.startRootUpdate(op);
// Rewrite arguments
{
for (auto i = 0; i < op->getNumOperands(); i++) {
for (unsigned i = 0; i < op->getNumOperands(); i++) {
auto operand = op->getOperand(i);
mlir::Type type = converter.convertType(operand.getType());
if (type != mlir::Type()) {
@@ -29,7 +29,7 @@ struct GenericTypeConverterPattern : public mlir::OpRewritePattern<Op> {
}
// Rewrite results
{
for (auto i = 0; i < op->getNumResults(); i++) {
for (unsigned i = 0; i < op->getNumResults(); i++) {
auto result = op->getResult(i);
mlir::Type type = converter.convertType(result.getType());
if (type != mlir::Type()) {

View File

@@ -19,7 +19,7 @@ struct LinalgGenericTypeConverterPattern
rewriter.startRootUpdate(op);
// Rewrite arguments
{
for (auto i = 0; i < op->getNumOperands(); i++) {
for (unsigned i = 0; i < op->getNumOperands(); i++) {
auto operand = op->getOperand(i);
mlir::Type type = converter.convertType(operand.getType());
if (type != mlir::Type()) {
@@ -29,7 +29,7 @@ struct LinalgGenericTypeConverterPattern
}
// Rewrite results
{
for (auto i = 0; i < op->getNumResults(); i++) {
for (unsigned i = 0; i < op->getNumResults(); i++) {
auto result = op->getResult(i);
mlir::Type type = converter.convertType(result.getType());
if (type != mlir::Type()) {

View File

@@ -33,7 +33,7 @@ public:
[](GLWECipherTextType type, mlir::zamalang::V0FHEContext &fheContext) {
auto glweSize = fheContext.parameter.getNBigGlweSize();
auto p = fheContext.constraint.p;
if (type.getDimension() == glweSize && type.getP() == p) {
if (type.getDimension() == (signed)glweSize && type.getP() == (signed)p) {
return type;
}
return GLWECipherTextType::get(