ARM Compiler 6.13 binary difference caused by UXTH and BEQ/BNE

When I build my ARM-CortexR5 project with ARM Compiler 6.13 twice, the binaries generated from first ELF and second ELF are different, afterwards I build the project 17 times, this issue is reproduced 3 times.

  • Sometimes the UXTH instruction is used.
  • Sometimes the BEQ is used rather than BNE.

This issue confused me for weeks, how to avoid the issues? Which version fixed it?

Product: DS-5 Professional 5.29.1
Component: ARM Compiler 6.13
Tool: armclang [5d895a00]