diff --git a/gcc/df-problems.cc b/gcc/df-problems.cc index f32185b3eac..90753793098 100644 --- a/gcc/df-problems.cc +++ b/gcc/df-problems.cc @@ -3893,9 +3893,11 @@ df_simulate_defs (rtx_insn *insn, bitmap live) { unsigned int dregno = DF_REF_REGNO (def); - /* If the def is to only part of the reg, it does - not kill the other defs that reach here. */ - if (!(DF_REF_FLAGS (def) & (DF_REF_PARTIAL | DF_REF_CONDITIONAL))) + /* If the def is to only part of the reg, model it as a RMW operation + by marking it live. It only kills the reg if it is a complete def. */ + if (DF_REF_FLAGS (def) & (DF_REF_PARTIAL | DF_REF_CONDITIONAL)) + bitmap_set_bit (live, dregno); + else bitmap_clear_bit (live, dregno); } } diff --git a/gcc/testsuite/gcc.target/aarch64/torture/pr116564.c b/gcc/testsuite/gcc.target/aarch64/torture/pr116564.c new file mode 100644 index 00000000000..d471e097294 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/torture/pr116564.c @@ -0,0 +1,11 @@ +/* { dg-do compile } */ +/* { dg-options "" } */ +#include +void test() +{ + for (int L = 0; L < 4; ++L) { + float64_t ResData[1 * 2]; + float64x1x2_t Src1; + vst2_f64(ResData, Src1); + } +}