A high-performance compiler ought to optimize away such temporaries regardless of where they come from. Moreover, it’s a stronger investment to build a robust high-level optimizer than generating custom code templates for various subcases.
2 Likes