Tool/software: Code Composer Studio
Hi,
This issue isn't actually fixed in general. The specific case I provide was resolved, but if you clear the same bit pattern from two (or more) bytes then the same de-optimisation occurs. Consider:
extern unsigned char src, dst0, dst1;
void func(void)
{
dst0 &= ~src;
dst1 &= ~src;
}
This produces the following code:
;** 6 ----------------------- C$1 = src^0xff;
.dwpsn file "bic.c",line 6,column 5,is_stmt,isa 0
MOV.B &src+0,r15 ; [] |6|
XOR.W #255,r15 ; [] |6|
;** 6 ----------------------- dst0 &= C$1;
AND.B r15,&dst0+0 ; [] |6|
;** 7 ----------------------- dst1 &= C$1;
.dwpsn file "bic.c",line 7,column 5,is_stmt,isa 0
AND.B r15,&dst1+0 ; [] |7|
;** ----------------------- return;