1. Mar 24, 2018
  2. Mar 23, 2018
    • Sanjay Patel's avatar
      [InstCombine] auto-generate checks; NFC · cd1f3e7a
      Sanjay Patel authored
      llvm-svn: 328329
      cd1f3e7a
    • Simon Pilgrim's avatar
    • Sanjay Patel's avatar
      [InstSimplify] regenerate checks, move tests; NFC · 3547dcb3
      Sanjay Patel authored
      llvm-svn: 328327
      3547dcb3
    • Zaara Syeda's avatar
      Re-commit: [MachineLICM] Add functions to MachineLICM to hoist invariant stores · 65359936
      Zaara Syeda authored
      This patch adds functions to allow MachineLICM to hoist invariant stores.
      Currently, MachineLICM does not hoist any store instructions, however
      when storing the same value to a constant spot on the stack, the store
      instruction should be considered invariant and be hoisted. The function
      isInvariantStore iterates each operand of the store instruction and checks
      that each register operand satisfies isCallerPreservedPhysReg. The store
      may be fed by a copy, which is hoisted by isCopyFeedingInvariantStore.
      This patch also adds the PowerPC changes needed to consider the stack
      register as caller preserved.
      
      Differential Revision: https://reviews.llvm.org/D40196
      
      llvm-svn: 328326
      65359936
    • Sanjay Patel's avatar
      [InstCombine] regenerate test checks; NFC · d189b596
      Sanjay Patel authored
      llvm-svn: 328325
      d189b596
    • Simon Pilgrim's avatar
      1335b9c0
    • Sanjay Patel's avatar
      [InstCombine] reduce code duplication; NFC · 713ca3d3
      Sanjay Patel authored
      llvm-svn: 328323
      713ca3d3
    • Sanjay Patel's avatar
      [InstCombine] improve variable name; NFC · 6de89ce3
      Sanjay Patel authored
      llvm-svn: 328322
      6de89ce3
    • John Brawn's avatar
      [AArch64] Don't reduce the width of loads if it prevents combining a shift · e3b44f9d
      John Brawn authored
      Loads and stores can only shift the offset register by the size of the value
      being loaded, but currently the DAGCombiner will reduce the width of the load
      if it's followed by a trunc making it impossible to later combine the shift.
      
      Solve this by implementing shouldReduceLoadWidth for the AArch64 backend and
      make it prevent the width reduction if this is what would happen, though do
      allow it if reducing the load width will let us eliminate a later sign or zero
      extend.
      
      Differential Revision: https://reviews.llvm.org/D44794
      
      llvm-svn: 328321
      e3b44f9d
    • Simon Pilgrim's avatar
      [X86][Btver2] Fix MicroOps counts for DPPS/YMM memory folded instructions · 5792e10f
      Simon Pilgrim authored
      This was due to a misunderstanding over what llvm calls a micro-op (retirement unit) is actually called a macro-op on the AMD/Jaguar target. Folded loads don't affect num macro ops.
      
      llvm-svn: 328320
      5792e10f
    • George Rimar's avatar
      [ELF] - Simplify. NFC. · 16f11462
      George Rimar authored
      llvm-svn: 328319
      16f11462
    • Simon Pilgrim's avatar
      [X86][Btver2] Cleanup SSE42 PCMPISTR/PCMPESTR string instructions to correctly... · 8619962c
      Simon Pilgrim authored
      [X86][Btver2] Cleanup SSE42 PCMPISTR/PCMPESTR string instructions to correctly use JFPU1 scheduler pipe followed by JLAGU/JSAGU/JFPA/JVALU function units
      
      Fixes throughput to match Agner/Fam16h-SoG as well.
      
      llvm-svn: 328318
      8619962c
    • Daniel Neilson's avatar
      Remove the deprecated single-alignment IRBuilder API for memcpy/memmove (NFC) · a0c5f3ef
      Daniel Neilson authored
      Summary:
      This change is part of step six in the series of changes to remove the alignment
      argument from memcpy/memmove/memset in favour of alignment attributes. At this
      point all users of the IRBuilder APIs for creating a memcpy/memmove call given
      a single value for alignment have been updated. We want to discourage usage of
      these old APIs in favour of the newer ones that allow for separate source and
      destination alignments, so this patch deletes the old API.
      
      Specifically, we remove from IRBuilder:
      CallInst *CreateMemCpy(Value *Dst, Value *Src, uint64_t Size, unsigned Align,
                             bool isVolatile = false, MDNode *TBAATag = nullptr,
                             MDNode *TBAAStructTag = nullptr,
                             MDNode *ScopeTag = nullptr,
                             MDNode *NoAliasTag = nullptr)
      CallInst *CreateMemCpy(Value *Dst, Value *Src, Value *Size, unsigned Align,
                             bool isVolatile = false, MDNode *TBAATag = nullptr,
                             MDNode *TBAAStructTag = nullptr,
                             MDNode *ScopeTag = nullptr,
                             MDNode *NoAliasTag = nullptr)
      CallInst *CreateMemMove(Value *Dst, Value *Src, uint64_t Size, unsigned Align,
                              bool isVolatile = false, MDNode *TBAATag = nullptr,
                              MDNode *ScopeTag = nullptr,
                              MDNode *NoAliasTag = nullptr)
      CallInst *CreateMemMove(Value *Dst, Value *Src, Value *Size, unsigned Align,
                              bool isVolatile = false, MDNode *TBAATag = nullptr,
                              MDNode *ScopeTag = nullptr,
                              MDNode *NoAliasTag = nullptr)
      
      Steps:
      Step 1) Remove alignment parameter and create alignment parameter attributes for
      memcpy/memmove/memset. ( rL322965, rC322964, rL322963 )
      Step 2) Expand the IRBuilder API to allow creation of memcpy/memmove with differing
      source and dest alignments. ( rL323597 )
      Step 3) Update Clang to use the new IRBuilder API. ( rC323617 )
      Step 4) Update Polly to use the new IRBuilder API. ( rL323618 )
      Step 5) Update LLVM passes that create memcpy/memmove calls to use the new IRBuilder API,
      and those that use use MemIntrinsicInst::[get|set]Alignment() to use [get|set]DestAlignment()
      and [get|set]SourceAlignment() instead. ( rL323886, rL323891, rL324148, rL324273, rL324278,
      rL324384, rL324395, rL324402, rL324626, rL324642, rL324653, rL324654, rL324773, rL324774,
      rL324781, rL324784, rL324955, rL324960, rL325816, rL327398, rL327421, rL328097 )
      Step 6) Remove the single-alignment IRBuilder API for memcpy/memmove, and the
      MemIntrinsicInst::[get|set]Alignment() methods.
      
      Reference
         http://lists.llvm.org/pipermail/llvm-dev/2015-August/089384.html
         http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20151109/312083.html
      
      llvm-svn: 328317
      a0c5f3ef
    • Matthew Simpson's avatar
      [SLP] Stop counting cost of gather sequences with multiple uses · 6c289a1c
      Matthew Simpson authored
      When building the SLP tree, we look for reuse among the vectorized tree
      entries. However, each gather sequence is represented by a unique tree entry,
      even though the sequence may be identical to another one. This means, for
      example, that a gather sequence with two uses will be counted twice when
      computing the cost of the tree. We should only count the cost of the definition
      of a gather sequence rather than its uses. During code generation, the
      redundant gather sequences are emitted, but we optimize them away with CSE. So
      it looks like this problem just affects the cost model.
      
      Differential Revision: https://reviews.llvm.org/D44742
      
      llvm-svn: 328316
      6c289a1c
    • Daniel Neilson's avatar
      Remove deprecated MemIntrinsic methods (NFC) · a92bcbb2
      Daniel Neilson authored
      Summary:
      This change is part of step six in the series of changes to remove
      the alignment argument from memcpy/memmove/memset in favour of
      alignment attributes. At this point all uses of
      MemIntrinsicInst::[get|set]Alignment() have been updated, so we now
      remove these methods entirely to discourage their use.
      
      Steps:
      Step 1) Remove alignment parameter and create alignment parameter attributes for
      memcpy/memmove/memset. ( rL322965, rC322964, rL322963 )
      Step 2) Expand the IRBuilder API to allow creation of memcpy/memmove with differing
      source and dest alignments. ( rL323597 )
      Step 3) Update Clang to use the new IRBuilder API. ( rC323617 )
      Step 4) Update Polly to use the new IRBuilder API. ( rL323618 )
      Step 5) Update LLVM passes that create memcpy/memmove calls to use the new IRBuilder API,
      and those that use use MemIntrinsicInst::[get|set]Alignment() to use [get|set]DestAlignment()
      and [get|set]SourceAlignment() instead. ( rL323886, rL323891, rL324148, rL324273, rL324278,
      rL324384, rL324395, rL324402, rL324626, rL324642, rL324653, rL324654, rL324773, rL324774,
      rL324781, rL324784, rL324955, rL324960, rL325816, rL327398, rL327421, rL328097 )
      Step 6) Remove the single-alignment IRBuilder API for memcpy/memmove, and the
      MemIntrinsicInst::[get|set]Alignment() methods.
      
      Reference
         http://lists.llvm.org/pipermail/llvm-dev/2015-August/089384.html
         http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20151109/312083.html
      
      llvm-svn: 328315
      a92bcbb2
    • Alexey Bataev's avatar
      [DEBUGINFO] Add flag for DWARF2 to use sections as references. · bff36086
      Alexey Bataev authored
      Summary:
      Some targets does not support labels inside debug sections, but support
      references in form `section+offset`. Patch adds initial support
      for this.
      
      Reviewers: echristo, probinson, jlebar
      
      Subscribers: llvm-commits, JDevlieghere
      
      Differential Revision: https://reviews.llvm.org/D43943
      
      llvm-svn: 328314
      bff36086
    • Christof Douma's avatar
      [ARM] Support float literals under XO · 4a025cc7
      Christof Douma authored
      When targeting execute-only and fp-armv8, float constants in a compare
      resulted in instruction selection failures. This is now fixed by using
      vmov.f32 where possible, otherwise the floating point constant is
      lowered into a integer constant that is moved into a floating point
      register.
      
      This patch also restores using fpcmp with immediate 0 under fp-armv8.
      
      Change-Id: Ie87229706f4ed879a0c0cf66631b6047ed6c6443
      llvm-svn: 328313
      4a025cc7
    • Florian Hahn's avatar
      Revert r328307: [IPSCCP] Use constant range information for comparisons of parameters. · f73c3ece
      Florian Hahn authored
      Reverted for now, due to it causing verifier failures.
      
      llvm-svn: 328312
      f73c3ece
    • Amara Emerson's avatar
      [GlobalISel] Fix legalizer combine to not use illegal input G_EXTRACT. · f5423559
      Amara Emerson authored
      This was being masked because GISel is enabled by default for -O0 and
      the abort was disabled. Modified test to explicitly enable abort.
      
      llvm-svn: 328311
      f5423559