Skip to content
  1. Sep 01, 2010
    • 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
    • Bill Wendling's avatar
      And ANDS pattern to match the t2ANDS pattern. · d657d825
      Bill Wendling authored
      llvm-svn: 112654
      d657d825
  2. Aug 31, 2010
  3. Aug 30, 2010
  4. Aug 29, 2010
  5. Aug 28, 2010
    • Bob Wilson's avatar
      Use pseudo instructions for VST1 and VST2. · 950882be
      Bob Wilson authored
      llvm-svn: 112357
      950882be
    • Bob Wilson's avatar
      We don't need to custom-select VLDMQ and VSTMQ anymore. · 8ee93947
      Bob Wilson authored
      llvm-svn: 112336
      8ee93947
    • Bob Wilson's avatar
      When merging Thumb2 loads/stores, do not give up when the offset is one of · ca5af129
      Bob Wilson authored
      the special values that for ARM would be used with IB or DA modes.  Fall
      through and consider materializing a new base address is it would be
      profitable.
      
      llvm-svn: 112329
      ca5af129
    • Bob Wilson's avatar
      Change ARM VFP VLDM/VSTM instructions to use addressing mode #4, just like · 13ce07fa
      Bob Wilson authored
      all the other LDM/STM instructions.  This fixes asm printer crashes when
      compiling with -O0.  I've changed one of the NEON tests (vst3.ll) to run
      with -O0 to check this in the future.
      
      Prior to this change VLDM/VSTM used addressing mode #5, but not really.
      The offset field was used to hold a count of the number of registers being
      loaded or stored, and the AM5 opcode field was expanded to specify the IA
      or DB mode, instead of the standard ADD/SUB specifier.  Much of the backend
      was not aware of these special cases.  The crashes occured when rewriting
      a frameindex caused the AM5 offset field to be changed so that it did not
      have a valid submode.  I don't know exactly what changed to expose this now.
      Maybe we've never done much with -O0 and NEON.  Regardless, there's no longer
      any reason to keep a count of the VLDM/VSTM registers, so we can use
      addressing mode #4 and clean things up in a lot of places.
      
      llvm-svn: 112322
      13ce07fa
  6. Aug 27, 2010
  7. Aug 26, 2010
  8. Aug 25, 2010
Loading