[Bug tree-optimization/100727] New: [12 Regression] Recent change to WITH_SIZE_EXPR handling breaks mn10300-elf
law at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun May 23 03:52:01 GMT 2021
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100727
Bug ID: 100727
Summary: [12 Regression] Recent change to WITH_SIZE_EXPR
handling breaks mn10300-elf
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: law at gcc dot gnu.org
Target Milestone: ---
This change:
2e6ad1ba532fe684633edac766c598be19ad3b59 is the first bad commit
commit 2e6ad1ba532fe684633edac766c598be19ad3b59
Author: Richard Biener <rguenther@suse.de>
Date: Wed May 19 10:20:37 2021 +0200
Enable more WITH_SIZE_EXPR processing
This enables the alias machinery for WITH_SIZE_EXPR which can appear
in call LHS and arguments. In particular this drops the NULL
return from get_base_address and it adjusts get_ref_base_and_extent
and friends to use the size information in WITH_SIZE_EXPR and
look through it for further processing.
2021-05-19 Richard Biener <rguenther@suse.de>
* builtins.c (get_object_alignment_1): Strip outer
WITH_SIZE_EXPR.
* tree-dfa.c (get_ref_base_and_extent): Handle outer
WITH_SIZE_EXPR for size processing and process the
containing ref.
* tree-ssa-alias.c (ao_ref_base_alias_set): Strip
outer WITH_SIZE_EXPR.
(ao_ref_base_alias_ptr_type): Likewise.
(refs_may_alias_p_2): Allow WITH_SIZE_EXPR in ref->ref
and handle that accordingly, stripping it for the
core alias workers.
* tree.c (get_base_address): Handle WITH_SIZE_EXPR by
looking through it instead of returning NULL.
Causes a correctness regression on mn10300-elf for
c-torture/execute/20020412-1.c at -O2. It appears to me that the assignments
to x and y before the call to foo get erroneously removed.
What's particularly interesting here is the .optimized dumps are the same, but
the .expand dumps differ significantly. Obviously this points to a problem not
in how this change affects the gimple optimizers, but how it affects the
gimple/tree->RTL translation.
http://3.14.90.209:8080/job/mn10300-elf/
More information about the Gcc-bugs
mailing list