I would like to check if Arm Compiler for Embedded FuSa 6.16.2 (armclang) targeting Cortex‑R5 with '-O0' optimization exhibits the same memory reload suppression issue as described in the [ThreadX GitHub issue #334](Found a bug which causes tx_byte_allocate() not thread-safe when use -O3 optimization!! · Issue #334 · eclipse-threadx/threadx) occurs with GCC when optimization level is '-O2 or higher'.
My question is:
- Does the Arm Compiler for Embedded FuSa 6.16.2 (armclang) with '-O0' also suppress memory reloads in similar circumstances?- If so, under what conditions or code patterns does this occur?- Are there any known workarounds or compiler flags to disable this behavior?
Environment details:
- 'Compiler': Arm Compiler for Embedded FuSa 6.16.2 (armclang)- 'Target': Cortex‑R5- 'Optimization level': `-O0`- 'Context': Verifying whether memory reload suppression (removal of redundant loads/stores without explicit volatile) takes place.
Any insights, prior reports, or recommended tests to confirm this would be greatly appreciated.