1. Oct 01, 2018
  2. Sep 30, 2018
    • Simon Pilgrim's avatar
      [X86][BtVer2] Add the ability to add additional uops for folded instructions · 9cec221a
      Simon Pilgrim authored
      Some instructions take an extra load uop - but not consistently.....
      
      llvm-svn: 343410
      9cec221a
    • Pavel Labath's avatar
      Pull GetSoftwareBreakpointPCOffset into base class · 99f436b0
      Pavel Labath authored
      Summary:
      This function encodes the knowledge of whether the PC points to the
      breakpoint instruction of the one following it after the breakpoint is
      "hit". This behavior mainly(*) depends on the architecture and not on the
      OS, so it makes sense for it to be implemented in the base class, where
      it can be shared between different implementations (Linux and NetBSD
      atm).
      
      (*) It is possible for an OS to expose a different API, perhaps by doing
      some fixups in the kernel. In this case, the implementation can override
      this function to implement custom behavior.
      
      Reviewers: krytarowski, zturner
      
      Subscribers: lldb-commits
      
      Differential Revision: https://reviews.llvm.org/D52532
      
      llvm-svn: 343409
      99f436b0
    • Ed Maste's avatar
      Update ifunc attribute support documentation · c37e58cc
      Ed Maste authored
      Previously we documented GNU binutils and glibc versions required for
      ifunc support, but our own lld linker and FreeBSD's rtld also support
      ifuncs.
      
      Differential Revision:	https://reviews.llvm.org/D52696
      
      llvm-svn: 343408
      c37e58cc
    • Sanjay Patel's avatar
      [InstCombine] try to convert vector insert+extract to trunc · 1e0f1f64
      Sanjay Patel authored
      This transform is requested for the backend in:
      https://bugs.llvm.org/show_bug.cgi?id=39016
      ...but I figured it was worth doing in IR too, and it's probably 
      easier to implement here, so that's this patch.
      
      In the simplest case, we are just truncating a scalar value. If the 
      extract index doesn't correspond to the LSBs of the scalar, then we 
      have to shift-right before the truncate. Endian-ness makes this tricky, 
      but hopefully the ASCII-art helps visualize the transform.
      
      Differential Revision: https://reviews.llvm.org/D52439
      
      llvm-svn: 343407
      1e0f1f64
    • Sanjay Patel's avatar
      [InstCombine] allow lengthening of insertelement to eliminate shuffles · 26c119a9
      Sanjay Patel authored
      As noted in post-commit comments for D52548, the limitation on 
      increasing vector length can be applied by opcode.
      As a first step, this patch only allows insertelement to be
      widened because that has no logical downsides for IR and has 
      little risk of pessimizing codegen.
      
      This may cause PR39132 to go into hiding during a full compile,
      but that bug is not fixed.
      
      llvm-svn: 343406
      26c119a9
    • Simon Pilgrim's avatar
      [DAG] Don't perform SINT_TO_FP<->UINT_TO_FP custom conversion after legalization · 818cfc40
      Simon Pilgrim authored
      The SINT_TO_FP<->UINT_TO_FP combines for non-negative integers should only occur for legal ops once LegalOperations = true
      
      No test case to hand, noticed when investigating PR38226 + PR38970
      
      llvm-svn: 343405
      818cfc40
    • Roman Lebedev's avatar
      0496477c
    • Simon Pilgrim's avatar
      [X86] Regenerate MMX coalescing test · 84e280ae
      Simon Pilgrim authored
      Exposes another extractelement(bitcast(scalartovector())) pattern
      
      llvm-svn: 343403
      84e280ae
    • Jonas Hahnfeld's avatar
      [libomptarget-nvptx] Align data sharing stack · 1bf767fb
      Jonas Hahnfeld authored
      NVPTX requires addresses of pointer locations to be 8-byte aligned
      or there will be an exception during runtime.
      This could happen without this patch as shown in the added test:
      getId() requires 4 byte of stack and putValueInParallel() uses 16
      bytes to store the addresses of the captured variables.
      
      Differential Revision: https://reviews.llvm.org/D52655
      
      llvm-svn: 343402
      1bf767fb
    • Jonas Hahnfeld's avatar
      [libomptarget-nvptx] Fix ancestor_thread_num and team_size (non-SPMD) · 067235f2
      Jonas Hahnfeld authored
      According to OpenMP 4.5, p250:12-14:
      
          If the requested nest level is outside the range of 0 and the
          nest level of the current thread, as returned by the omp_get_level
          routine, the routine returns -1.
      
      The SPMD code path will need a similar fix.
      
      Differential Revision: https://reviews.llvm.org/D51787
      
      llvm-svn: 343401
      067235f2
    • Zachary Turner's avatar
      [PDB] Fix this test for real. · 9be3b6a1
      Zachary Turner authored
      I was able to test this fix on an actual Windows machine
      so this should get the bot green again.
      
      llvm-svn: 343400
      9be3b6a1
    • Craig Topper's avatar
      [X86] Disable BMI BEXTR in X86DAGToDAGISel::matchBEXTRFromAnd unless we're on... · 1709829f
      Craig Topper authored
      [X86] Disable BMI BEXTR in X86DAGToDAGISel::matchBEXTRFromAnd unless we're on compiling for a CPU with single uop BEXTR
      
      Summary:
      This function turns (X >> C1) & C2 into a BMI BEXTR or TBM BEXTRI instruction. For BMI BEXTR we have to materialize an immediate into a register to feed to the BEXTR instruction.
      
      The BMI BEXTR instruction is 2 uops on Intel CPUs. It looks like on SKL its one port 0/6 uop and one port 1/5 uop. Despite what Agner's tables say. I know one of the uops is a regular shift uop so it would have to go through the port 0/6 shifter unit. So that's the same or worse execution wise than the shift+and which is one 0/6 uop and one 0/1/5/6 uop. The move immediate into register is an additional 0/1/5/6 uop.
      
      For now I've limited this transform to AMD CPUs which have a single uop BEXTR. If may also might make sense if we can fold a load or if the and immediate is larger than 32-bits and can't be encoded as a sign extended 32-bit value or if LICM or CSE can hoist the move immediate and share it. But we'd need to look more carefully at that. In the regression I looked at it doesn't look load folding or large immediates were occurring so the regression isn't caused by the loss of those. So we could try to be smarter here if we find a compelling case.
      
      Reviewers: RKSimon, spatel, lebedev.ri, andreadb
      
      Reviewed By: RKSimon
      
      Subscribers: llvm-commits, andreadb, RKSimon
      
      Differential Revision: https://reviews.llvm.org/D52570
      
      llvm-svn: 343399
      1709829f
    • Zachary Turner's avatar
      Only dump the types we need in the test. · 6e6d545d
      Zachary Turner authored
      We added support for dumping pointers but pointers to arrays
      won't correctly dump until we add support for dumping arrays.
      Instead of trying to dump everything, which this test isn't
      even interested in, just dump enums and typedefs.
      
      llvm-svn: 343398
      6e6d545d
    • Zachary Turner's avatar
      Fix some tests on Windows. · a1e79e32
      Zachary Turner authored
      I don't actually have a Windows machine at the present moment,
      so hopefully this fixes it.
      
      llvm-svn: 343397
      a1e79e32