Skip to content
  1. Oct 17, 2008
    • Dan Gohman's avatar
      Fun x86 encoding tricks: when adding an immediate value of 128, · ca0546fa
      Dan Gohman authored
      use a SUB instruction instead of an ADD, because -128 can be
      encoded in an 8-bit signed immediate field, while +128 can't be.
      This avoids the need for a 32-bit immediate field in this case.
      
      A similar optimization applies to 64-bit adds with 0x80000000,
      with the 32-bit signed immediate field.
      
      To support this, teach tablegen how to handle 64-bit constants.
      
      llvm-svn: 57663
      ca0546fa
    • Dan Gohman's avatar
      Define patterns for shld and shrd that match immediate · a39b0a1f
      Dan Gohman authored
      shift counts, and patterns that match dynamic shift counts
      when the subtract is obscured by a truncate node.
      
      Add DAGCombiner support for recognizing rotate patterns
      when the shift counts are defined by truncate nodes.
      
      Fix and simplify the code for commuting shld and shrd
      instructions to work even when the given instruction doesn't
      have a parent, and when the caller needs a new instruction.
      
      These changes allow LLVM to use the shld, shrd, rol, and ror
      instructions on x86 to replace equivalent code using two
      shifts and an or in many more cases.
      
      llvm-svn: 57662
      a39b0a1f
  2. Oct 16, 2008
  3. Oct 15, 2008
  4. Oct 14, 2008
  5. Oct 13, 2008
    • Dan Gohman's avatar
      When doing the very-late shift-and address-mode optimization, · 56b68851
      Dan Gohman authored
      create a new DAG node to represent the new shift to keep the
      DAG consistent, even though it'll almost always be folded into
      the address.
      
      If a user of the resulting address has multiple uses, the
      nodes may get revisited by a later MatchAddress call, in which
      case DAG inconsistencies do matter.
      
      This fixes PR2849.
      
      llvm-svn: 57465
      56b68851
  6. Oct 12, 2008
  7. Oct 11, 2008
Loading