test(compiler): LowLFHEUnpametrize

This commit is contained in:
Quentin Bourgerie
2021-09-09 20:56:59 +02:00
parent 8cc0af1220
commit c37ac41c1a
2 changed files with 15 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
// RUN: zamacompiler --passes lowlfhe-unparametrize %s 2>&1| FileCheck %s
// CHECK-LABEL: func @main(%arg0: !LowLFHE.lwe_ciphertext<_,_>) -> !LowLFHE.lwe_ciphertext<_,_>
func @main(%arg0: !LowLFHE.lwe_ciphertext<1024,4>) -> !LowLFHE.lwe_ciphertext<1024,4> {
// CHECK-NEXT: return %arg0 : !LowLFHE.lwe_ciphertext<_,_>
return %arg0: !LowLFHE.lwe_ciphertext<1024,4>
}

View File

@@ -0,0 +1,8 @@
// RUN: zamacompiler --passes lowlfhe-unparametrize %s 2>&1| FileCheck %s
// CHECK-LABEL: func @main(%arg0: !LowLFHE.lwe_ciphertext<_,_>) -> !LowLFHE.lwe_ciphertext<_,_>
func @main(%arg0: !LowLFHE.lwe_ciphertext<1024,4>) -> !LowLFHE.lwe_ciphertext<_,_> {
// CHECK-NEXT: return %arg0 : !LowLFHE.lwe_ciphertext<_,_>
%0 = unrealized_conversion_cast %arg0 : !LowLFHE.lwe_ciphertext<1024,4> to !LowLFHE.lwe_ciphertext<_,_>
return %0: !LowLFHE.lwe_ciphertext<_,_>
}