Skip to content
  1. Aug 30, 2010
  2. Aug 29, 2010
  3. Aug 26, 2010
    • Jim Grosbach's avatar
      Restrict the register to tGPR to make sure the str instruction will be · 074d22e1
      Jim Grosbach authored
      encodable as a 16-bit wide instruction.
      
      llvm-svn: 112195
      074d22e1
    • Dan Gohman's avatar
      Revert r112176; it broke test/CodeGen/Thumb2/thumb2-cmn.ll. · 10b20b2b
      Dan Gohman authored
      llvm-svn: 112191
      10b20b2b
    • Bill Wendling's avatar
      There seems to be a (potential) hardware bug with the CMN instruction and · a9a0599b
      Bill Wendling authored
      comparison with 0. These two pieces of code should give identical results:
      
        rsbs r1, r1, 0
        cmp  r0, r1
        mov  r0, #0
        it   ls
        mov  r0, #1
      
      and:
      
        cmn  r0, r1
        mov  r0, #0
        it   ls
        mov  r0, #1
      
      However, the CMN gives the *opposite* result when r1 is 0. This is because the
      carry flag is set in the CMP case but not in the CMN case. In short, the CMP
      instruction doesn't perform a truncate of the (logical) NOT of 0 plus the value
      of r0 and the carry bit (because the "carry bit" parameter to AddWithCarry is
      defined as 1 in this case, the carry flag will always be set when r0 >= 0). The
      CMN instruction doesn't perform a NOT of 0 so there is never a "carry" when this
      AddWithCarry is performed (because the "carry bit" parameter to AddWithCarry is
      defined as 0).
      
      The AddWithCarry in the CMP case seems to be relying upon the identity:
      
        ~x + 1 = -x
      
      However when x is 0 and unsigned, this doesn't hold:
      
         x = 0
        ~x = 0xFFFF FFFF
        ~x + 1 = 0x1 0000 0000
        (-x = 0) != (0x1 0000 0000 = ~x + 1)
      
      Therefore, we should disable *all* versions of CMN, especially when comparing
      against zero, until we can limit when the CMN instruction is used (when we know
      that the RHS is not 0) or when we have a hardware fix for this.
      
      (See the ARM docs for the "AddWithCarry" pseudo-code.)
      
      This is related to <rdar://problem/7569620>.
      
      llvm-svn: 112176
      a9a0599b
  4. Aug 19, 2010
  5. Aug 17, 2010
  6. Aug 16, 2010
  7. Aug 14, 2010
  8. Aug 13, 2010
  9. Aug 11, 2010
  10. Aug 10, 2010
  11. Aug 08, 2010
  12. Jul 31, 2010
  13. Jul 30, 2010
    • Jim Grosbach's avatar
      Many Thumb2 instructions can reference the full ARM register set (i.e., · d343166a
      Jim Grosbach authored
      have 4 bits per register in the operand encoding), but have undefined
      behavior when the operand value is 13 or 15 (SP and PC, respectively).
      The trivial coalescer in linear scan sometimes will merge a copy from
      SP into a subsequent instruction which uses the copy, and if that
      instruction cannot legally reference SP, we get bad code such as:
        mls r0,r9,r0,sp
      instead of:
        mov r2, sp
        mls r0, r9, r0, r2
      
      This patch adds a new register class for use by Thumb2 that excludes
      the problematic registers (SP and PC) and is used instead of GPR
      for those operands which cannot legally reference PC or SP. The
      trivial coalescer explicitly requires that the register class
      of the destination for the COPY instruction contain the source
      register for the COPY to be considered for coalescing. This prevents
      errant instructions like that above.
      
      PR7499
      
      llvm-svn: 109842
      d343166a
    • Nate Begeman's avatar
      c4a96c0e
  14. Jul 29, 2010
  15. Jul 20, 2010
  16. Jul 17, 2010
  17. Jul 14, 2010
  18. Jun 29, 2010
  19. Jun 24, 2010
  20. Jun 21, 2010
  21. Jun 19, 2010
    • Evan Cheng's avatar
      Allow ARM if-converter to be run after post allocation scheduling. · 2d51c7c5
      Evan Cheng authored
      - This fixed a number of bugs in if-converter, tail merging, and post-allocation
        scheduler. If-converter now runs branch folding / tail merging first to
        maximize if-conversion opportunities.
      - Also changed the t2IT instruction slightly. It now defines the ITSTATE
        register which is read by instructions in the IT block.
      - Added Thumb2 specific hazard recognizer to ensure the scheduler doesn't
        change the instruction ordering in the IT block (since IT mask has been
        finalized). It also ensures no other instructions can be scheduled between
        instructions in the IT block.
      
      This is not yet enabled.
      
      llvm-svn: 106344
      2d51c7c5
  22. Jun 02, 2010
  23. May 28, 2010
  24. May 26, 2010
Loading