1. Sep 13, 2016
  2. Sep 12, 2016
    • Sanjay Patel's avatar
      fix formatting; NFC · 0531f0a5
      Sanjay Patel authored
      llvm-svn: 281220
      0531f0a5
    • Sanjay Patel's avatar
      [InstCombine] add tests to show missing vector folds · db400baa
      Sanjay Patel authored
      llvm-svn: 281219
      db400baa
    • Igor Breger's avatar
      add select i1 test, reproduser pr30249. · a3e36da6
      Igor Breger authored
      llvm-svn: 281218
      a3e36da6
    • Sanjay Patel's avatar
      [InstCombine] add helper function for foldICmpUsingKnownBits; NFCI · 3151dec7
      Sanjay Patel authored
      llvm-svn: 281217
      3151dec7
    • Sam Kolton's avatar
      [AMDGPU] Assembler: Move disabled SDWA and DPP instruction into Disable asm variant · fb0d9d9c
      Sam Kolton authored
      Summary: This removes disabled instructions from match tables so we will not match them at all.
      
      Reviewers: tstellarAMD, vpykhtin, artem.tamazov
      
      Subscribers: wdng, nhaehnle, arsenm
      
      Differential Revision: https://reviews.llvm.org/D24452
      
      llvm-svn: 281216
      fb0d9d9c
    • James Molloy's avatar
      [Thumb] Teach ISel how to lower compares of AND bitmasks efficiently · 1e1b56bd
      James Molloy authored
      For the common pattern (CMPZ (AND x, #bitmask), #0), we can do some more efficient instruction selection if the bitmask is one consecutive sequence of set bits (32 - clz(bm) - ctz(bm) == popcount(bm)).
      
      1) If the bitmask touches the LSB, then we can remove all the upper bits and set the flags by doing one LSLS.
      2) If the bitmask touches the MSB, then we can remove all the lower bits and set the flags with one LSRS.
      3) If the bitmask has popcount == 1 (only one set bit), we can shift that bit into the sign bit with one LSLS and change the condition query from NE/EQ to MI/PL (we could also implement this by shifting into the carry bit and branching on BCC/BCS).
      4) Otherwise, we can emit a sequence of LSLS+LSRS to remove the upper and lower zero bits of the mask.
      
      1-3 require only one 16-bit instruction and can elide the CMP. 4 requires two 16-bit instructions but can elide the CMP and doesn't require materializing a complex immediate, so is also a win.
      
      llvm-svn: 281215
      1e1b56bd
    • Sanjay Patel's avatar
      fix formatting/typos; NFC · 53523317
      Sanjay Patel authored
      llvm-svn: 281214
      53523317
    • James Molloy's avatar
      [ARM] Promote small global constants to constant pools · 8f82d45f
      James Molloy authored
      If a constant is unamed_addr and is only used within one function, we can save
      on the code size and runtime cost of an indirection by changing the global's storage
      to inside the constant pool. For example, instead of:
      
            ldr r0, .CPI0
            bl printf
            bx lr
          .CPI0: &format_string
          format_string: .asciz "hello, world!\n"
      
      We can emit:
      
            adr r0, .CPI0
            bl printf
            bx lr
          .CPI0: .asciz "hello, world!\n"
      
      This can cause significant code size savings when many small strings are used in one
      function (4 bytes per string).
      
      llvm-svn: 281213
      8f82d45f