1. Jul 01, 2018
    • Craig Topper's avatar
      [X86] Move the memory unfolding table creation into its own class and make it a ManagedStatic. · 4e78213a
      Craig Topper authored
      Also move the static folding tables, their search functions and the new class into new cpp/h files.
      
      The unfolding table is effectively static data. It's just a different ordering and a subset of the static folding tables.
      
      By putting it in a separate ManagedStatic we ensure we only have one copy instead of one per X86InstrInfo object. This way also makes it only get initialized when really needed.
      
      llvm-svn: 336056
      4e78213a
    • Craig Topper's avatar
      [X86] Move the X86InstrFMA3Info class into the cpp file. Expose only a... · 84199deb
      Craig Topper authored
      [X86] Move the X86InstrFMA3Info class into the cpp file. Expose only a getFMA3Group free function. NFCI
      
      The class only exists to hold a DenseMap and is only created as a ManagedStatic. It used to expose a single static method that outside code was expected to use.
      
      This patch moves that static function out of the class and moves it implementation into the cpp file. It can now access the ManagedStatic directly by name without the need for the other static method that accessed the ManagedStatic.
      
      llvm-svn: 336055
      84199deb
    • Craig Topper's avatar
      [X86] Remove the AsmName from the HAX,HDX,HCX,HBX,HSI,HDI,HBP,HSP,HIP... · 73174074
      Craig Topper authored
      [X86] Remove the AsmName from the HAX,HDX,HCX,HBX,HSI,HDI,HBP,HSP,HIP artificial registers so they can't be parsed by the assembly parser.
      
      There are no instructions that use them so they weren't causing any bad matches. But they weren't being diagnosed as "invalid register name" if they were used and would instead trigger some form of invalid operand.
      
      llvm-svn: 336054
      73174074
    • David Carlier's avatar
      [UBsan] Enable subset of unit tests for OpenBSD · c33f35ff
      David Carlier authored
      Reviewers: kubamracek, krytarowski
      
      Reviewed By: krytarowski
      
      Differential Revision: https://reviews.llvm.org/D48805
      
      llvm-svn: 336053
      c33f35ff
    • Craig Topper's avatar
      [X86] Use MVT::i8 for scalar shift amounts since that is what they ultimately need to legalize to. · 1b7b9b85
      Craig Topper authored
      I believe all of these are constants so legalizing them should be pretty trivial, but this saves a step.
      
      In one case it looks like we may have been creating a shift amount larger than the shift input itself.
      
      llvm-svn: 336052
      1b7b9b85
    • Craig Topper's avatar
      [X86] When combining load to BZHI, make sure we create the shift instruction with an i8 type. · 5f28d50d
      Craig Topper authored
      This combine runs pretty late and causes us to introduce a shift after the op legalization phase has run. We need to be sure we create the shift with the proper type for the shift amount. If we don't do this, we will still re-legalize the operation properly, but we won't get a chance to fully optimize the truncate that gets inserted.
      
      So this patch adds the necessary truncate when the shift is created. I've also narrowed the subtract that gets created to always be an i32 type. The truncate would have trigered SimplifyDemandedBits to optimize it anyway. But using a more appropriate VT here is free and saves an optimization step.
      
      llvm-svn: 336051
      5f28d50d
  2. Jun 30, 2018