https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113847
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
I can't confirm a regression (testing r14-8925-g1e3f78dbb328a2 with the
offending rev reverted vs bare).
462.libquantum 20720 61.9 335 S 20720 62.6 331 *
462.libquantum 20720 62.2 333 * 20720 61.9 335 S
462.libquantum 20720 62.4 332 S 20720 62.7 330 S
so the "best" run with the change is faster than the best run with it reverted
while the worst runs are the same.
There's only code-gen changes in quantum_bmeasure.part.0 and we can see
it's likely
{component_ref<node>,mem_ref<0B>,reg_3(D)}@.MEM_166 (0030)
vs
{component_ref<hash>,mem_ref<0B>,reg_3(D)}@.MEM_9 (0022)
where once the size is 256 and once 64. The types are
<record_type 0x7ffff6a753f0 quantum_reg BLK
size <integer_cst 0x7ffff6c29138 type <integer_type 0x7ffff6c250a8
bitsizetype> constant 256>
unit-size <integer_cst 0x7ffff6c29228 type <integer_type 0x7ffff6c25000
sizetype> constant 32>
vs.
<pointer_type 0x7ffff6a813f0
type <record_type 0x7ffff6a81348 quantum_reg_node TI
size <integer_cst 0x7ffff6c0be10 constant 128>
unit-size <integer_cst 0x7ffff6c0be28 constant 16>
the former is subsetted by a COMPONENT_REF to eventually
<pointer_type 0x7ffff6e752a0
type <record_type 0x7ffff6e751f8 quantum_reg_node VOID
align:8 warn_if_not_align:0 symtab:0 alias-set -1 structural-equality
pointer_to_this <pointer_type 0x7ffff6e752a0>>
unsigned DI
so we have basically MEM<ptr + off> vs. MEM<ptr>.member-with-off.
That's indeed a case where we maybe like to avoid applying this fix, but
maybe only when strict-aliasing is in effect.