Skip to content
  1. Nov 07, 2017
  2. Sep 21, 2017
  3. Sep 05, 2017
  4. Aug 14, 2017
    • Lei Huang's avatar
      [PowerPC] Add codegen for VSX word extract convert to FP · 451ef4ad
      Lei Huang authored
      Add codegen for VSX word extract conversion from signed/unsigned to single/double
      precision.
      
      For UINT_TO_FP:
      Extract word unsigned and convert to float was implemented in https://reviews.llvm.org/D20239.
      Here we will add the missing extract integer and conversion to double. This
      utilizes the new P9 instruction xxextractuw to extracting an integer element
      when the result will be converted to double thereby saving 2 direct moves
      (VSR <-> GPR).
      
      For SINT_TO_FP:
      We will implement the following sequence which will also reduce the number of
      instructions by saving 2 direct moves.
      
      v4i32->f32:
              xxspltw
              xvcvsxwsp
              xscvspdpn
      
      v4i32->f64:
              xxspltw
              xvcvsxwdp
      
      Differential Revision: https://reviews.llvm.org/D35859
      
      llvm-svn: 310866
      451ef4ad
  5. Jul 13, 2017
  6. Jul 05, 2017
  7. Jun 12, 2017
    • Tony Jiang's avatar
      [PowerPC] Match vec_revb builtins to P9 instructions. · 1a8eec14
      Tony Jiang authored
      Power9 has instructions that will reverse the bytes within an element for all
      sizes (half-word, word, double-word and quad-word). These can be used for the
      vec_revb builtins in altivec.h. However, we implement these to match vector
      shuffle nodes as that will cover both the builtins and vector shuffles that
      occur in the SDAG through other means.
      
      Differential Revision: https://reviews.llvm.org/D33690
      
      llvm-svn: 305214
      1a8eec14
  8. Jun 08, 2017
    • Zaara Syeda's avatar
      [Power9] Exploit vector integer extend instructions · 79acbbe5
      Zaara Syeda authored
      This patch adds build vector patterns to exploit the vector integer
      extend instructions:
      vextsb2w - Vector Extend Sign Byte To Word
      vextsb2d - Vector Extend Sign Byte To Doubleword
      vextsh2w - Vector Extend Sign Halfword To Word
      vextsh2d - Vector Extend Sign Halfword To Doubleword
      vextsw2d - Vector Extend Sign Word To Doubleword
      
      Differential Revision: https://reviews.llvm.org/D33510
      
      llvm-svn: 304992
      79acbbe5
  9. May 31, 2017
  10. May 29, 2017
    • Hiroshi Inoue's avatar
      [PPC] Fix assertion failure during binary encoding with -mcpu=pwr9 · e3c14ebb
      Hiroshi Inoue authored
      Summary
      clang -c -mcpu=pwr9 test/CodeGen/PowerPC/build-vector-tests.ll causes an assertion failure during the binary encoding.
      The failure occurs when a D-form load instruction takes two register operands instead of a register + an immediate.
      
      This patch fixes the problem and also adds an assertion to catch this failure earlier before the binary encoding (i.e. during lit test).
      The fix is from Nemanja Ivanovic @nemanjai.
      
      Differential Revision: https://reviews.llvm.org/D33482
      
      llvm-svn: 304133
      e3c14ebb
  11. May 25, 2017
  12. May 24, 2017
  13. May 12, 2017
    • Guozhi Wei's avatar
      [PPC] Change the register constraint of the first source operand of... · 22e7da95
      Guozhi Wei authored
      [PPC] Change the register constraint of the first source operand of instruction mtvsrdd to g8rc_nox0
      
      According to Power ISA V3.0 document, the first source operand of mtvsrdd is constant 0 if r0 is specified. So the corresponding register constraint should be g8rc_nox0.
      
      This bug caused wrong output generated by 401.bzip2 when -mcpu=power9 and fdo are specified.
      
      Differential Revision: https://reviews.llvm.org/D32880
      
      llvm-svn: 302834
      22e7da95
  14. May 02, 2017
  15. Mar 30, 2017
  16. Mar 15, 2017
  17. Jan 26, 2017
  18. Dec 15, 2016
    • Nemanja Ivanovic's avatar
      [Power9] Allow AnyExt immediates for XXSPLTIB · 552c8e96
      Nemanja Ivanovic authored
      In some situations, the BUILD_VECTOR node that builds a v18i8 vector by
      a splat of an i8 constant will end up with signed 8-bit values and other
      situations, it'll end up with unsigned ones. Handle both situations.
      
      Fixes PR31340.
      
      llvm-svn: 289804
      552c8e96
  19. Dec 09, 2016
  20. Dec 06, 2016
    • Nemanja Ivanovic's avatar
      [PowerPC] Improvements for BUILD_VECTOR Vol. 4 · 15748f49
      Nemanja Ivanovic authored
      This is the final patch in the series of patches that improves
      BUILD_VECTOR handling on PowerPC. This adds a few peephole optimizations
      to remove redundant instructions. It also adds a large test case which
      encompasses a large set of code patterns that build vectors - this test
      case was the motivator for this series of patches.
      
      Differential Revision: https://reviews.llvm.org/D26066
      
      llvm-svn: 288800
      15748f49
  21. Nov 30, 2016
  22. Nov 29, 2016
  23. Nov 23, 2016
    • Nemanja Ivanovic's avatar
      [PowerPC] Remove InstAlias definitions that cause incorrect assembly · 10fc3cfc
      Nemanja Ivanovic authored
      In rL283190, I added some InstAlias definitions to generate extended mnemonics
      for some uses of the XXPERMDI instruction. However, when the assembler matches
      these extended mnemonics, it matches the new instruction in situations where it
      should match the old one.
      This patch removes these definitions and accomplishes that by defining these
      mnemonics with additional instructions that are isCodeGenOnly.
      
      Fixes PR31127.
      
      llvm-svn: 287765
      10fc3cfc
  24. Nov 22, 2016
  25. Nov 15, 2016
    • Zaara Syeda's avatar
      vector load store with length (left justified) llvm portion · a19c9e60
      Zaara Syeda authored
      llvm-svn: 286993
      a19c9e60
    • Tony Jiang's avatar
      [PowerPC] Implement BE VSX load/store builtins - llvm portion. · 5f850cd1
      Tony Jiang authored
      This patch implements all the overloads for vec_xl_be and vec_xst_be. On BE,
      they behaves exactly the same with vec_xl and vec_xst, therefore they are
      simply implemented by defining a matching macro. On LE, they are implemented
      by defining new builtins and intrinsics. For int/float/long long/double, it
      is just a load (lxvw4x/lxvd2x) or store(stxvw4x/stxvd2x). For char/char/short,
      we also need some extra shuffling before or after call the builtins to get the
      desired BE order. For int128, simply call vec_xl or vec_xst.
      
      llvm-svn: 286967
      5f850cd1
  26. Nov 14, 2016
  27. Nov 11, 2016
  28. Oct 26, 2016
  29. Oct 24, 2016
  30. Oct 04, 2016
    • Nemanja Ivanovic's avatar
      [Power9] Exploit D-Form VSX Scalar memory ops that target full VSX register set · 6354d235
      Nemanja Ivanovic authored
      This patch corresponds to review:
      
      The newly added VSX D-Form (register + offset) memory ops target the upper half
      of the VSX register set. The existing ones target the lower half. In order to
      unify these and have the ability to target all the VSX registers using D-Form
      operations, this patch defines Pseudo-ops for the loads/stores which are
      expanded post-RA. The expansion then choses the correct opcode based on the
      register that was allocated for the operation.
      
      llvm-svn: 283212
      6354d235
    • Nemanja Ivanovic's avatar
      [Power9] Part-word VSX integer scalar loads/stores and sign extend instructions · 11049f8f
      Nemanja Ivanovic authored
      This patch corresponds to review:
      https://reviews.llvm.org/D23155
      
      This patch removes the VSHRC register class (based on D20310) and adds
      exploitation of the Power9 sub-word integer loads into VSX registers as well
      as vector sign extensions.
      The new instructions are useful for a few purposes:
      
          Int to Fp conversions of 1 or 2-byte values loaded from memory
          Building vectors of 1 or 2-byte integers with values loaded from memory
          Storing individual 1 or 2-byte elements from integer vectors
      
      This patch implements all of those uses.
      
      llvm-svn: 283190
      11049f8f
  31. Sep 27, 2016
    • Nemanja Ivanovic's avatar
      [Power9] Builtins for ELF v.2 API conformance - back end portion · 6f22b413
      Nemanja Ivanovic authored
      This patch corresponds to review:
      https://reviews.llvm.org/D24396
      
      This patch adds support for the "vector count trailing zeroes",
      "vector compare not equal" and "vector compare not equal or zero instructions"
      as well as "scalar count trailing zeroes" instructions. It also changes the
      vector negation to use XXLNOR (when VSX is enabled) so as not to increase
      register pressure (previously this was done with a splat immediate of all
      ones followed by an XXLXOR). This was done because the altivec.h
      builtins (patch to follow) use vector negation and the use of an additional
      register for the splat immediate is not optimal.
      
      llvm-svn: 282478
      6f22b413
  32. Sep 23, 2016
  33. Sep 22, 2016
  34. Aug 18, 2016
Loading