https://gcc.gnu.org/bugzilla/show_bug.cgi?id=27800
--- Comment #5 from GCC 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:bed6ec161be8c5ca2f24195900ce3c9b81c3e141 commit r15-276-gbed6ec161be8c5ca2f24195900ce3c9b81c3e141 Author: Richard Biener <rguent...@suse.de> Date: Tue Feb 20 11:47:03 2024 +0100 middle-end/27800 - avoid unnecessary temporary during gimplification This avoids a tempoary when gimplifying reg = a ? b : c, re-using the LHS of an assignment if that's a register. PR middle-end/27800 * gimplify.cc (gimplify_modify_expr_rhs): For a COND_EXPR avoid a temporary from gimplify_cond_expr when the LHS is a register by pushing the assignment into the COND_EXPR arms. * gcc.dg/pr27800.c: New testcase.