aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/expr.cc
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2025-03-04 10:34:39 +0100
committerRichard Biener <rguenth@gcc.gnu.org>2025-04-28 15:08:44 +0200
commit6901d56fea2132389e9a7ae60b4d9731e6e3c65a (patch)
treeeb7a2ae8de688134127c474cf9feddf3e893e030 /gcc/fortran/expr.cc
parent99aa410f5e0a722822698e765ca165e73ca4f637 (diff)
downloadgcc-6901d56fea2132389e9a7ae60b4d9731e6e3c65a.zip
gcc-6901d56fea2132389e9a7ae60b4d9731e6e3c65a.tar.gz
gcc-6901d56fea2132389e9a7ae60b4d9731e6e3c65a.tar.bz2
tree-optimization/119103 - missed overwidening detection for shift
When vectorizing a shift of u16 data by an amount that's known to be less than 16 we currently fail to emit a vector u16 shift. The first reason is that the promotion of the shift amount is hoisted only by PRE and that cannot preserve range info, the second reason is that pattern detection doesn't use range info when computing the precision required for an operation. The following addresses the first issue by making LIM hoist all expressions for the pass that runs right before PRE and the second issue by querying ranges for the shift amount. PR tree-optimization/119103 * tree-ssa-loop-im.cc (in_loop_pipeline): Globalize. (compute_invariantness): Override costing when we run right before PRE and PRE is enabled. (pass_lim::execute): Adjust. * tree-vect-patterns.cc (vect_determine_precisions_from_users): For variable shift amounts use range information. * gcc.target/i386/pr119103.c: New testcase.
Diffstat (limited to 'gcc/fortran/expr.cc')
0 files changed, 0 insertions, 0 deletions