Closed pftbest closed 11 months ago
There were some changes in add-with-carry in mainline... Probably we need to lower them better.
As I can see ADDC/SUBC
was deprecated and default action was set to expand
for them (see details https://reviews.llvm.org/D47422).
We need to make them legal
for msp430 to return the previous behavior.
There is also one more case which is not optimal even on old clang:
long foo = 0;
void bar() {
foo += 1;
}
While on gcc it is fine:
ADD access-softek/msp430-clang#1, &foo
ADDC #0, &foo+2
RET
This simple program:
Compiles to this strange sequence of instructions:
While the output from gcc and clang-6.0 is much more reasonable: