Swapping function arguments in libcalls

Hello, I don’t know if this has ever been discussed or mentioned, it’s something simple so it could have been talked before, forgive me in that case. The idea is to basically commute/swap function arguments just like in instructions if it’s beneficial, mainly for libcalls. Consider this example:

typedef float t;
t foo(t a, t b)
return a*b;

this gets compiled into (msp430 asm, arm does the same):
call #__mulsf3

but if we instead do “return b*a;” we get:
push.w r11
push.w r10
mov.w r14, r11
mov.w r15, r10
mov.w r13, r15
mov.w r12, r14
mov.w r10, r13
mov.w r11, r12
call #__mulsf3
pop.w r10
pop.w r11

Notice the arguments are getting swapped for a commutable operation were there order shouldn’t matter. Just an idea to push the optimizations further.