mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-01-03 14:23:07 +00:00
More commutative fns
This commit is contained in:
parent
98c4a372fb
commit
cb2df9fa03
@ -97,7 +97,7 @@ fn remove_swapped_pushes(code: &mut Vec<Item>) {
|
||||
fn remove_swaps_commutative(code: &mut Vec<Item>) {
|
||||
replace_windows(code, |window| {
|
||||
if let [StandardOp(swap1), StandardOp(f)] = window && &swap1 == "SWAP1" {
|
||||
let commutative = matches!(f.as_str(), "ADD" | "MUL");
|
||||
let commutative = matches!(f.as_str(), "ADD" | "MUL" | "AND" | "OR" | "XOR" | "EQ");
|
||||
commutative.then_some(vec![StandardOp(f)])
|
||||
} else {
|
||||
None
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user