https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105735
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by hongtao Liu <liuho...@gcc.gnu.org>: https://gcc.gnu.org/g:fd1596f9962569afff6c9298a7c79686c6950bef commit r14-5428-gfd1596f9962569afff6c9298a7c79686c6950bef Author: liuhongt <hongtao....@intel.com> Date: Mon Oct 30 15:43:48 2023 +0800 Handle bitop with INTEGER_CST in analyze_and_compute_bitop_with_inv_effect. analyze_and_compute_bitop_with_inv_effect assumes the first operand is loop invariant which is not the case when it's INTEGER_CST. gcc/ChangeLog: PR tree-optimization/105735 PR tree-optimization/111972 * tree-scalar-evolution.cc (analyze_and_compute_bitop_with_inv_effect): Handle bitop with INTEGER_CST. gcc/testsuite/ChangeLog: * gcc.target/i386/pr105735-3.c: New test.