Skip to content

Commit

Permalink
add a test that chains together many poly ops
Browse files Browse the repository at this point in the history
  • Loading branch information
j2kun committed Oct 20, 2023
1 parent 67f7dad commit e3e84ba
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/poly_to_standard.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,15 @@ func.func @test_lower_eval(%0 : !poly.poly<10>, %1 : i32) -> i32 {
%2 = poly.eval %0, %1: (!poly.poly<10>, i32) -> i32
return %2 : i32
}


// CHECK-LABEL: test_lower_many
// CHECK-NOT: poly
func.func @test_lower_many(%arg : !poly.poly<10>, %point : i32) -> i32 {
%0 = poly.constant dense<[2, 3, 4]> : tensor<3xi32> : !poly.poly<10>
%1 = poly.add %0, %arg : !poly.poly<10>
%2 = poly.mul %1, %1 : !poly.poly<10>
%3 = poly.sub %2, %arg : !poly.poly<10>
%4 = poly.eval %3, %point: (!poly.poly<10>, i32) -> i32
return %4 : i32
}

0 comments on commit e3e84ba

Please sign in to comment.