diff --git a/compiler/include/zamalang/Conversion/MidLFHEToLowLFHE/Patterns.h b/compiler/include/zamalang/Conversion/MidLFHEToLowLFHE/Patterns.h index a27c5df49..78e2b1356 100644 --- a/compiler/include/zamalang/Conversion/MidLFHEToLowLFHE/Patterns.h +++ b/compiler/include/zamalang/Conversion/MidLFHEToLowLFHE/Patterns.h @@ -27,6 +27,7 @@ LweCiphertextType convertTypeToLWE(mlir::MLIRContext *context, return lwe; } assert(false && "expect glwe or lwe"); + return nullptr; } template @@ -50,6 +51,7 @@ PlaintextType convertPlaintextTypeFromType(mlir::MLIRContext *context, return convertPlaintextTypeFromPType(context, lwe); } assert(false && "expect glwe or lwe"); + return nullptr; } template @@ -73,6 +75,7 @@ CleartextType convertCleartextTypeFromType(mlir::MLIRContext *context, return convertCleartextTypeFromPType(context, lwe); } assert(false && "expect glwe or lwe"); + return nullptr; } mlir::Value createZeroLWEOpFromMidLFHE(mlir::PatternRewriter rewriter, @@ -113,7 +116,6 @@ mlir::Value createAddPlainLweCiphertextWithGlwe( .create(loc, encoded_type, arg1) .plaintext(); // convert result type - GLWECipherTextType glwe_type = result.getType().cast(); LweCiphertextType lwe_type = convertTypeToLWE(rewriter.getContext(), result.getType()); // replace op using the encoded plaintext instead of int