https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115836
--- Comment #16 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-11 branch has been updated by Uros Bizjak <u...@gcc.gnu.org>: https://gcc.gnu.org/g:d67566cefe7325998cc2471a28e9d3a3016455a0 commit r11-11568-gd67566cefe7325998cc2471a28e9d3a3016455a0 Author: Uros Bizjak <ubiz...@gmail.com> Date: Wed Jul 10 09:27:27 2024 +0200 middle-end: Fix stalled swapped condition code value [PR115836] emit_store_flag_1 calculates scode (swapped condition code) at the beginning of the function from the value of code variable. However, code variable may change before scode usage site, resulting in invalid stalled scode value. Move calculation of scode value just before its only usage site to avoid stalled scode value. PR middle-end/115836 gcc/ChangeLog: * expmed.c (emit_store_flag_1): Move calculation of scode just before its only usage site. (cherry picked from commit 44933fdeb338e00c972e42224b9a83d3f8f6a757)