https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111000
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Richard Biener <rgue...@gcc.gnu.org>: https://gcc.gnu.org/g:d118738e71cf4615f170fff8dabe66442206d008 commit r14-4786-gd118738e71cf4615f170fff8dabe66442206d008 Author: Richard Biener <rguent...@suse.de> Date: Fri Oct 20 11:54:07 2023 +0200 tree-optimization/111000 - restrict invariant motion of shifts The following restricts moving variable shifts to when they are always executed in the loop as we currently do not have an efficient way to rewrite them to something that is unconditionally well-defined and value range analysis will otherwise compute invalid ranges for the shift operand. PR tree-optimization/111000 * stor-layout.h (element_precision): Move .. * tree.h (element_precision): .. here. * tree-ssa-loop-im.cc (movement_possibility_1): Restrict motion of shifts and rotates. * gcc.dg/torture/pr111000.c: New testcase.