test(compiler): Re introduce tests that was removed by a prior refacto

This commit is contained in:
Quentin Bourgerie
2021-10-22 15:36:25 +02:00
committed by Andi Drebes
parent 85d102c9b2
commit e66fb20c4f
2 changed files with 15 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
// RUN: zamacompiler --passes lowlfhe-unparametrize --action=dump-llvm-dialect %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 --action=dump-llvm-dialect %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 = builtin.unrealized_conversion_cast %arg0 : !LowLFHE.lwe_ciphertext<1024,4> to !LowLFHE.lwe_ciphertext<_,_>
return %0: !LowLFHE.lwe_ciphertext<_,_>
}