diff options
author | Richard Biener <rguenther@suse.de> | 2023-07-27 13:08:32 +0200 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2023-07-27 15:55:18 +0200 |
commit | d1c072a1c3411a6fe29900750b38210af8451eeb (patch) | |
tree | 1be2c459b42d23ba8214bcaae402ffe2ecc3ccc7 /gcc/expr.cc | |
parent | a426b91b27e28985f47d16827a532fbc28c09bd7 (diff) | |
download | gcc-d1c072a1c3411a6fe29900750b38210af8451eeb.zip gcc-d1c072a1c3411a6fe29900750b38210af8451eeb.tar.gz gcc-d1c072a1c3411a6fe29900750b38210af8451eeb.tar.bz2 |
tree-optimization/91838 - fix FAIL of g++.dg/opt/pr91838.C
The following fixes the lack of simplification of a vector shift
by an out-of-bounds shift value. For scalars this is done both
by CCP and VRP but vectors are not handled there. This results
in PR91838 differences in outcome dependent on whether a vector
shift ISA is available and thus vector lowering does or does not
expose scalar shifts here.
The following adds a match.pd pattern to catch uniform out-of-bound
shifts, simplifying them to zero when not sanitizing shift amounts.
PR tree-optimization/91838
* gimple-match-head.cc: Include attribs.h and asan.h.
* generic-match-head.cc: Likewise.
* match.pd (([rl]shift @0 out-of-bounds) -> zero): New pattern.
Diffstat (limited to 'gcc/expr.cc')
0 files changed, 0 insertions, 0 deletions