title: GCC optimisation: use of ARM conditional instructions?
body: <p>I'm looking at some code compiled for iOS in XCode (so compiled for ARM with gcc) and as far as I can see, the compiler has never used ARM's feature of allowing arbitrary instructions to have a condition attached to them, but instead always branches on a condition as would be the case on Intel and other architectures.</p>
  
  <p>Is this simply a restriction of GCC (I can understand that it might be: that "condition = branch" is embedded at a too high a level in the compiler architecture to allow otherwise), or is there a particular optimisation flag that needs to be turned on to allow compilation of conditional instructions?</p>
  
  <p>(Obviously I appreciate I'm making big assumptions about where use of conditional instructions "ought" to be used and would actually be an optimisation, but I have experience of programming earlier ARM chips and using and analysing the output of Acorn's original ARM C compiler, so I have a rough idea.)</p>
  
  <p><strong>Update:</strong> Having investigated this more thanks to the information below, it turns out that:</p>
  
  <ul>
  <li>XCode compiles in Thumb-2 mode, in which conditional execution of arbitrary instructions is not available;</li>
  <li>Under some circumstances, it does however <strong>use the ITE (if-then-else)</strong> instruction to effectively produce instructions with conditional execution.</li>
  </ul>