Skip to content
  1. Oct 06, 2010
    • Evan Cheng's avatar
      - Add TargetInstrInfo::getOperandLatency() to compute operand latencies. This · 49d4c0bd
      Evan Cheng authored
        allow target to correctly compute latency for cases where static scheduling
        itineraries isn't sufficient. e.g. variable_ops instructions such as
        ARM::ldm.
        This also allows target without scheduling itineraries to compute operand
        latencies. e.g. X86 can return (approximated) latencies for high latency
        instructions such as division.
      - Compute operand latencies for those defined by load multiple instructions,
        e.g. ldm and those used by store multiple instructions, e.g. stm.
      
      llvm-svn: 115755
      49d4c0bd
  2. Oct 02, 2010
  3. Sep 30, 2010
  4. Sep 29, 2010
  5. Sep 25, 2010
  6. Sep 24, 2010
  7. Sep 21, 2010
    • Chris Lattner's avatar
      fix a long standing wart: all the ComplexPattern's were being · 0e023ea0
      Chris Lattner authored
      passed the root of the match, even though only a few patterns
      actually needed this (one in X86, several in ARM [which should
      be refactored anyway], and some in CellSPU that I don't feel 
      like detangling).   Instead of requiring all ComplexPatterns to
      take the dead root, have targets opt into getting the root by
      putting SDNPWantRoot on the ComplexPattern.
      
      llvm-svn: 114471
      0e023ea0
  8. Sep 09, 2010
  9. Sep 06, 2010
  10. Sep 01, 2010
    • Chris Lattner's avatar
      temporarily revert r112664, it is causing a decoding conflict, and · 39eccb47
      Chris Lattner authored
      the testcases should be merged.
      
      llvm-svn: 112711
      39eccb47
    • Bill Wendling's avatar
      We have a chance for an optimization. Consider this code: · 6789f8b6
      Bill Wendling authored
      int x(int t) {
        if (t & 256)
          return -26;
        return 0;
      }
      
      We generate this:
      
           tst.w   r0, #256
           mvn     r0, #25
           it      eq
           moveq   r0, #0
      
      while gcc generates this:
      
           ands    r0, r0, #256
           it      ne
           mvnne   r0, #25
           bx      lr
      
      Scandalous really!
      
      During ISel time, we can look for this particular pattern. One where we have a
      "MOVCC" that uses the flag off of a CMPZ that itself is comparing an AND
      instruction to 0. Something like this (greatly simplified):
      
        %r0 = ISD::AND ...
        ARMISD::CMPZ %r0, 0         @ sets [CPSR]
        %r0 = ARMISD::MOVCC 0, -26  @ reads [CPSR]
      
      All we have to do is convert the "ISD::AND" into an "ARM::ANDS" that sets [CPSR]
      when it's zero. The zero value will all ready be in the %r0 register and we only
      need to change it if the AND wasn't zero. Easy!
      
      llvm-svn: 112664
      6789f8b6
  11. Aug 31, 2010
  12. Aug 30, 2010
  13. Aug 29, 2010
  14. 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
  15. Aug 19, 2010
  16. Aug 17, 2010
  17. Aug 16, 2010
  18. Aug 14, 2010
  19. Aug 13, 2010
  20. Aug 11, 2010
  21. Aug 10, 2010
Loading