1. Jun 13, 2019
    • Simon Pilgrim's avatar
    • Philip Reames's avatar
      [SCEV] Teach computeSCEVAtScope benefit from one-input Phi. PR39673 · e51c3d8b
      Philip Reames authored
      SCEV does not propagate arguments through one-input Phis so as to make it easy for the SCEV expander (and related code) to preserve LCSSA.  It's not entirely clear this restriction is neccessary, but for the moment it exists.   For this reason, we don't analyze single-entry phi inputs.  However it is possible that when an this input leaves the loop through LCSSA Phi, it is a provable constant.  Missing that results in an order of optimization issue in loop exit value rewriting where we miss some oppurtunities based on order in which we visit sibling loops.
      
      This patch teaches computeSCEVAtScope about this case. We can generalize it later, but so far we can only replace LCSSA Phis with their constant loop-exiting values.  We should probably also add similiar logic directly in the SCEV construction path itself.
      
      Patch by: mkazantsev (with revised commit message by me)
      Differential Revision: https://reviews.llvm.org/D58113
      
      llvm-svn: 363180
      e51c3d8b
    • Simon Pilgrim's avatar
      [TargetLowering] Add MachineMemOperand::Flags to allowsMemoryAccess tests (PR42123) · 4e0648a5
      Simon Pilgrim authored
      As discussed on D62910, we need to check whether particular types of memory access are allowed, not just their alignment/address-space.
      
      This NFC patch adds a MachineMemOperand::Flags argument to allowsMemoryAccess and allowsMisalignedMemoryAccesses, and wires up calls to pass the relevant flags to them.
      
      If people are happy with this approach I can then update X86TargetLowering::allowsMisalignedMemoryAccesses to handle misaligned NT load/stores.
      
      Differential Revision: https://reviews.llvm.org/D63075
      
      llvm-svn: 363179
      4e0648a5
    • Simon Pilgrim's avatar
      [X86][AVX] Fold concat(vpermilps(x,c),vpermilps(y,c)) -> vpermilps(concat(x,y),c) · 5b0e0dd7
      Simon Pilgrim authored
      Handles PSHUFD/PSHUFLW/PSHUFHW (AVX2) + VPERMILPS (AVX1).
      
      An extra AVX1 PSHUFD->VPERMILPS combine will be added in a future commit.
      
      llvm-svn: 363178
      5b0e0dd7
  2. Jun 12, 2019