Skip to content
  1. Aug 16, 2010
  2. Aug 15, 2010
  3. Aug 14, 2010
  4. Aug 13, 2010
  5. Aug 12, 2010
  6. Aug 11, 2010
    • Dan Gohman's avatar
      Don't use unsigned char for alignments in TargetData. There aren't · a5a25036
      Dan Gohman authored
      that many of these things, so the memory savings isn't significant,
      and there are now situations where there can be alignments greater
      than 128.
      
      llvm-svn: 110836
      a5a25036
    • Dan Gohman's avatar
      Use ISD::ADD instead of ISD::SUB with a negated constant. This · 5531aa4d
      Dan Gohman authored
      avoids trouble if the return type of TD->getPointerSize() is
      changed to something which doesn't promote to a signed type,
      and is simpler anyway.
      
      Also, use getCopyFromReg instead of getRegister to read a
      physical register's value.
      
      llvm-svn: 110835
      5531aa4d
    • Jim Grosbach's avatar
      cortex m4 has floating point support, but only single precision. · 4d5dc3e7
      Jim Grosbach authored
      llvm-svn: 110810
      4d5dc3e7
    • Bill Wendling's avatar
      Consider this code snippet: · 6a981314
      Bill Wendling authored
      float t1(int argc) {
        return (argc == 1123) ? 1.234f : 2.38213f;
      }
      
      We would generate truly awful code on ARM (those with a weak stomach should look
      away):
      
      _t1:
        movw   r1, #1123
        movs   r2, #1
        movs   r3, #0
        cmp    r0, r1
        mov.w  r0, #0
        it     eq
        moveq  r0, r2
        movs   r1, #4
        cmp    r0, #0
        it     ne
        movne  r3, r1
        adr    r0, #LCPI1_0
        ldr    r0, [r0, r3]
        bx     lr
      
      The problem was that legalization was creating a cascade of SELECT_CC nodes, for
      for the comparison of "argc == 1123" which was fed into a SELECT node for the ?:
      statement which was itself converted to a SELECT_CC node. This is because the
      ARM back-end doesn't have custom lowering for SELECT nodes, so it used the
      default "Expand".
      
      I added a fairly simple "LowerSELECT" to the ARM back-end. It takes care of this
      testcase, but can obviously be expanded to include more cases.
      
      Now we generate this, which looks optimal to me:
      
      _t1:
        movw   r1, #1123
        movs   r2, #0
        cmp    r0, r1
        adr    r0, #LCPI0_0
        it     eq
        moveq  r2, #4
        ldr    r0, [r0, r2]
        bx     lr
        .align  2
      LCPI0_0:
        .long   1075344593  @ float 2.382130e+00
        .long   1067316150  @ float 1.234000e+00
      
      llvm-svn: 110799
      6a981314
    • Evan Cheng's avatar
      Report error if codegen tries to instantiate a ARM target when the cpu does... · 5190f092
      Evan Cheng authored
      Report error if codegen tries to instantiate a ARM target when the cpu does support it. e.g. cortex-m* processors.
      
      llvm-svn: 110798
      5190f092
    • Evan Cheng's avatar
      ArchV7M implies HW division instructions. · 163b624b
      Evan Cheng authored
      llvm-svn: 110797
      163b624b
    • Evan Cheng's avatar
      ArchV6T2, V7A, and V7M implies Thumb2; Archv7A implies NEON. · 1c3c0009
      Evan Cheng authored
      llvm-svn: 110796
      1c3c0009
Loading