[Bug rtl-optimization/61810] init-regs.c papers over issues elsewhere
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Sep 2 21:14:56 GMT 2025
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61810
--- Comment #13 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #7)
> FAIL: gcc.target/i386/pr98335.c scan-assembler movzbl
> FAIL: gcc.target/i386/pr98335.c scan-assembler-not movb
I think I understand these:
we have:
```
struct Data {
char a;
int b;
};
char c;
Data val(int idx) {
return { c };
}
```
We first do:
```
MEM <char[1]> [(union Data *)&D.2968 + 1B] = {};
D.2968.a = c_3(D);
```
But when expanding D.2968 is a register. If we had a late "SRA" like pass which
handles things like this we could instead just set the full register to zero
and not end up with this partial set which needs to combine with the zeroing
from init-regs.
More information about the Gcc-bugs
mailing list