egraphs: Add some select optimizations
#6843
+235
−0
Merged