Re: AVR/GNU C Compiler 15 - Non efficient bit access
Jeffrey Law via Gcc-help <[email protected]> Sun, 15 Feb 2026 08:33:05 -0700
| Newsgroups | gmane.comp.gcc.help |
|---|---|
| Message-ID | <[email protected]> |
On 2/14/2026 8:44 PM, [email protected] wrote: > Hello Johann and GNU team, > > Thanks for taking a look at this, I confirm that when using > -fno-tree-dominator-opts, the compiler generates the SBIC and SBIS opcodes. > > What is the recommended action now? > Do you consider this a bug in .uncprop1? (Since activating the optimization > causes less efficient code) Recommended action would be to get a bug filed in gcc.gnu.org/bugzilla so that it can be tracked over time. I doubt this is an easy code quality regression to fix. Based on Georg-Johann's analysis, the passes are basically behaving as designed. DOM's job is to squash out redundancies, so it's going to do aggressive constant propagation including conditional propagation of constants. uncprop will undo some of those propagations late in the gimple passes, essentially turning references to the constant 0 into an SSA_NAME object when that object is known to have the value zero. This helps reduce on-edge insertions of constant initializations as we leave gimple and lower to RTL. The existence of volatile accesses is certainly going to inhibit both the gimple and RTL optimizers in various ways. It's an additional wrinkle that will need to be considered. jeff