https://gcc.gnu.org/g:a3d141316c413256adc59f49cb9094d3f76a017f
commit r16-5675-ga3d141316c413256adc59f49cb9094d3f76a017f Author: Wilco Dijkstra <[email protected]> Date: Wed Sep 17 16:36:33 2025 +0000 AArch64: Use dmb ishld+ishst for release fence Use dmb ishld and dmb ishst for a release fence since this is less restrictive than dmb ish. gcc: * config/aarch64/atomics.md (*dmb): Expand release fence into dmb ishld and dmb ishst. Diff: --- gcc/config/aarch64/atomics.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gcc/config/aarch64/atomics.md b/gcc/config/aarch64/atomics.md index ea4a9367fc88..d4b4afb5815d 100644 --- a/gcc/config/aarch64/atomics.md +++ b/gcc/config/aarch64/atomics.md @@ -870,7 +870,13 @@ enum memmodel model = memmodel_from_int (INTVAL (operands[1])); if (is_mm_acquire (model)) return "dmb\\tishld"; + else if (is_mm_release (model)) + return "dmb\\tishld\;dmb\\tishst"; else return "dmb\\tish"; } + [(set (attr "length") + (if_then_else + (match_test "is_mm_release (memmodel_from_int (INTVAL (operands[1])))") + (const_int 8) (const_int 4)))] )
