File tree 1 file changed +14
-0
lines changed
mlir/test/Dialect/Polynomial
1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -101,3 +101,17 @@ func.func @test_canonicalize_fold_sub_through_intt(
101
101
%out = polynomial.ntt %a_plus_b {root =#root } : !ntt_poly_ty -> !tensor_ty
102
102
return %out : !tensor_ty
103
103
}
104
+
105
+
106
+ // CHECK-LABEL: test_canonicalize_do_not_fold_different_roots
107
+ // CHECK: arith.addi
108
+ func.func @test_canonicalize_do_not_fold_different_roots (
109
+ %poly0 : !ntt_poly_ty ,
110
+ %poly1 : !ntt_poly_ty ) -> !ntt_poly_ty {
111
+ %0 = polynomial.ntt %poly0 {root =#polynomial.primitive_root <value =31 :i32 , degree =8 :index >} : !ntt_poly_ty -> !tensor_ty
112
+ %1 = polynomial.ntt %poly1 {root =#polynomial.primitive_root <value =33 :i32 , degree =8 :index >} : !ntt_poly_ty -> !tensor_ty
113
+ %a_plus_b = arith.addi %0 , %1 : !tensor_ty
114
+ %out = polynomial.intt %a_plus_b {root =#root } : !tensor_ty -> !ntt_poly_ty
115
+ return %out : !ntt_poly_ty
116
+ }
117
+
You can’t perform that action at this time.
0 commit comments