tree-optimization/98834 - fix optimization regression with _b_c_p
authorRichard Biener <rguenther@suse.de>
Mon, 15 Mar 2021 12:44:07 +0000 (13:44 +0100)
committerRichard Biener <rguenther@suse.de>
Mon, 15 Mar 2021 15:00:20 +0000 (16:00 +0100)
commit99415d0f18716deeaa8d80e929b1337968cdfa23
tree60084803a0a4462c80258b679890806c159408f0
parentdce586ff83e5bf86956cb24e646c7b9a21283ce4
tree-optimization/98834 - fix optimization regression with _b_c_p

The following makes FRE optimize a load we formerly required
SRA + CCP for which now run after we get rid of all __builtin_constant_p
calls.

2021-03-15  Richard Biener  <rguenther@suse.de>

PR tree-optimization/98834
* tree-ssa-sccvn.c (vn_reference_lookup_3): Handle missing
subsetting by truncating the access size.

* g++.dg/opt/pr98834.C: New testcase.
gcc/testsuite/g++.dg/opt/pr98834.C [new file with mode: 0644]
gcc/tree-ssa-sccvn.c