Commit cd8c2f8e authored by Ted Themistokleous's avatar Ted Themistokleous
Browse files

fixup! fixup! Add skip_broadcasts to simplify algebra value matchers

parent f715ad3f
...@@ -915,10 +915,10 @@ struct find_zero_ops ...@@ -915,10 +915,10 @@ struct find_zero_ops
{ {
auto matcher() const auto matcher() const
{ {
auto mul_zero = match::name("mul")(match::either_arg(0, 1)( auto mul_zero = match::name("mul")(
match::has_value(0.0f).bind("x"), match::any())); match::either_arg(0, 1)(match::has_value(0.0f).bind("x"), match::any()));
auto div_zero = match::name("div")( auto div_zero =
match::has_value(0.0f).bind("x"), match::any()); match::name("div")(match::args(match::has_value(0.0f).bind("x"), match::any()));
return match::any_of(mul_zero, div_zero); return match::any_of(mul_zero, div_zero);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment