Displaying 1 result from an estimated 1 matches for "ecc189c1".
2020 Oct 06
2
Optimizing assembly generated for tail call
Hello,
I recently found that LLVM generates sub-optimal assembly for a tail call
optimization case. Below is an example (https://godbolt.org/z/ao15xE):
> void g1();
> void g2();
> void f(bool v) {
> if (v) {
> g1();
> } else {
> g2();
> }
> }
>
The assembly generated is as follow:
> f(bool): # @f(bool)
> testb %dil, %dil
> je .LBB0_2
>