diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8040d0d59af..7a691f28499 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,9 @@ 2020-05-06 Jakub Jelinek + PR target/94950 + * config/riscv/riscv-builtins.c (riscv_atomic_assign_expand_fenv): Use + TARGET_EXPR instead of MODIFY_EXPR for first assignment to old_flags. + PR rtl-optimization/94873 * combine.c (combine_instructions): Don't optimize using REG_EQUAL note if SET_SRC (set) has side-effects. diff --git a/gcc/config/riscv/riscv-builtins.c b/gcc/config/riscv/riscv-builtins.c index 201fdb52f20..a45108e0355 100644 --- a/gcc/config/riscv/riscv-builtins.c +++ b/gcc/config/riscv/riscv-builtins.c @@ -283,8 +283,8 @@ riscv_atomic_assign_expand_fenv (tree *hold, tree *clear, tree *update) tree fsflags = GET_BUILTIN_DECL (CODE_FOR_riscv_fsflags); tree old_flags = create_tmp_var_raw (RISCV_ATYPE_USI); - *hold = build2 (MODIFY_EXPR, RISCV_ATYPE_USI, old_flags, - build_call_expr (frflags, 0)); + *hold = build4 (TARGET_EXPR, RISCV_ATYPE_USI, old_flags, + build_call_expr (frflags, 0), NULL_TREE, NULL_TREE); *clear = build_call_expr (fsflags, 1, old_flags); *update = NULL_TREE; }