On Sat, Apr 27, 2024 at 1:04 AM Andrew Pinski <quic_apin...@quicinc.com> wrote: > > When cfgexpand was changed to support expanding from tuple gimple > (r0-95521-g28ed065ef9f345), the code was added to support > doing nontemporal stores with LHS of a SSA_NAME but that will > never be a nontemporal store. > This patch removes that and asserts that expanding with a LHS > of a SSA_NAME is not a nontemporal store. > > Bootstrapped and tested on x86_64-linux-gnu.
OK. > gcc/ChangeLog: > > PR middle-end/112976 > * cfgexpand.cc (expand_gimple_stmt_1): Remove > support for expanding nontemporal "moves" with > ssa names on the LHS. > > Signed-off-by: Andrew Pinski <quic_apin...@quicinc.com> > --- > gcc/cfgexpand.cc | 11 ++++------- > 1 file changed, 4 insertions(+), 7 deletions(-) > > diff --git a/gcc/cfgexpand.cc b/gcc/cfgexpand.cc > index eef565eddb5..cfc5291aa0c 100644 > --- a/gcc/cfgexpand.cc > +++ b/gcc/cfgexpand.cc > @@ -4002,17 +4002,16 @@ expand_gimple_stmt_1 (gimple *stmt) > else > { > rtx target, temp; > - bool nontemporal = gimple_assign_nontemporal_move_p (assign_stmt); > + gcc_assert (!gimple_assign_nontemporal_move_p (assign_stmt)); > bool promoted = false; > > target = expand_expr (lhs, NULL_RTX, VOIDmode, EXPAND_WRITE); > if (GET_CODE (target) == SUBREG && SUBREG_PROMOTED_VAR_P (target)) > promoted = true; > > - /* If we want to use a nontemporal store, force the value to > - register first. If we store into a promoted register, > - don't directly expand to target. */ > - temp = nontemporal || promoted ? NULL_RTX : target; > + /* If we store into a promoted register, don't directly > + expand to target. */ > + temp = promoted ? NULL_RTX : target; > temp = expand_expr_real_gassign (assign_stmt, temp, > GET_MODE (target), > EXPAND_NORMAL); > > @@ -4034,8 +4033,6 @@ expand_gimple_stmt_1 (gimple *stmt) > > convert_move (SUBREG_REG (target), temp, unsignedp); > } > - else if (nontemporal && emit_storent_insn (target, temp)) > - ; > else > { > temp = force_operand (temp, target); > -- > 2.43.0 >