Skip to content
  1. Jan 01, 2012
  2. Dec 30, 2011
  3. Dec 29, 2011
  4. Dec 28, 2011
  5. Dec 27, 2011
  6. Dec 25, 2011
  7. Dec 24, 2011
    • Rafael Espindola's avatar
      Section relative fixups are a coff concept, not a x86 one. Replace the · a56ab0ed
      Rafael Espindola authored
      x86 specific reloc_coff_secrel32 with a generic FK_SecRel_4.
      
      llvm-svn: 147252
      a56ab0ed
    • Chandler Carruth's avatar
      Use standard promotion for i8 CTTZ nodes and i8 CTLZ nodes when the · a3d54fe0
      Chandler Carruth authored
      LZCNT instructions are available. Force promotion to i32 to get
      a smaller encoding since the fix-ups necessary are just as complex for
      either promoted type
      
      We can't do standard promotion for CTLZ when lowering through BSR
      because it results in poor code surrounding the 'xor' at the end of this
      instruction. Essentially, if we promote the entire CTLZ node to i32, we
      end up doing the xor on a 32-bit CTLZ implementation, and then
      subtracting appropriately to get back to an i8 value. Instead, our
      custom logic just uses the knowledge of the incoming size to compute
      a perfect xor. I'd love to know of a way to fix this, but so far I'm
      drawing a blank. I suspect the legalizer could be more clever and/or it
      could collude with the DAG combiner, but how... ;]
      
      llvm-svn: 147251
      a3d54fe0
    • Chandler Carruth's avatar
      Add systematic testing for cttz as well, and fix the bug I spotted by · 38ce2445
      Chandler Carruth authored
      inspection earlier.
      
      llvm-svn: 147250
      38ce2445
    • Benjamin Kramer's avatar
      Chandler fixed this. · 767bbe48
      Benjamin Kramer authored
      llvm-svn: 147247
      767bbe48
    • Chandler Carruth's avatar
      Expand more when we have a nice 'tzcnt' instruction, to avoid generating · c9fcde23
      Chandler Carruth authored
      'bsf' instructions here.
      
      This one is actually debatable to my eyes. It's not clear that any chip
      implementing 'tzcnt' would have a slow 'bsf' for any reason, and unless
      EFLAGS or a zero input matters, 'tzcnt' is just a longer encoding.
      Still, this restores the old behavior with 'tzcnt' enabled for now.
      
      llvm-svn: 147246
      c9fcde23
    • Chandler Carruth's avatar
      Switch the lowering of CTLZ_ZERO_UNDEF from a .td pattern back to the · 7e9453e9
      Chandler Carruth authored
      X86ISelLowering C++ code. Because this is lowered via an xor wrapped
      around a bsr, we want the dagcombine which runs after isel lowering to
      have a chance to clean things up. In particular, it is very common to
      see code which looks like:
      
        (sizeof(x)*8 - 1) ^ __builtin_clz(x)
      
      Which is trying to compute the most significant bit of 'x'. That's
      actually the value computed directly by the 'bsr' instruction, but if we
      match it too late, we'll get completely redundant xor instructions.
      
      The more naive code for the above (subtracting rather than using an xor)
      still isn't handled correctly due to the dagcombine getting confused.
      
      Also, while here fix an issue spotted by inspection: we should have been
      expanding the zero-undef variants to the normal variants when there is
      an 'lzcnt' instruction. Do so, and test for this. We don't want to
      generate unnecessary 'bsr' instructions.
      
      These two changes fix some regressions in encoding and decoding
      benchmarks. However, there is still a *lot* to be improve on in this
      type of code.
      
      llvm-svn: 147244
      7e9453e9
    • Jakob Stoklund Olesen's avatar
      Fix Comments. · 103318e9
      Jakob Stoklund Olesen authored
      llvm-svn: 147238
      103318e9
    • Akira Hatanaka's avatar
      Add MachineMemOperands to instructions generated in storeRegToStackSlot or · 1cf75767
      Akira Hatanaka authored
      loadRegFromStackSlot. 
      
      llvm-svn: 147235
      1cf75767
Loading