https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91532
Bug ID: 91532 Summary: [SVE] Redundant predicated store in gcc.target/aarch64/fmla_2.c Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: rsandifo at gcc dot gnu.org Target Milestone: --- In gcc.target/aarch64/fmla_2.c, we end up with two stores to the first array after if-conversion: _ifc__59 = *_55; _ifc__61 = _4 != 0 ? iftmp.0_31 : _ifc__59; *_55 = _ifc__61; iftmp.1_35 = __builtin_fma (_6, pretmp_53, pretmp_54); _ifc__64 = _4 == 0 ? pretmp_53 : _ifc__61; *_55 = _ifc__64; instead of: iftmp.1_35 = __builtin_fma (_6, pretmp_53, pretmp_54); _ifc__64 = _4 == 0 ? pretmp_53 : iftmp.0_31; *_55 = _ifc__64; We never recover from this and end up with the two stores to *_55 in the output: st1d z2.d, p0, [x0, x6, lsl 3] ... st1d z0.d, p0, [x0, x6, lsl 3]