Skip to content
  1. Feb 12, 2019
  2. Feb 11, 2019
    • Matt Arsenault's avatar
      GlobalISel: Verify G_EXTRACT · b2d24577
      Matt Arsenault authored
      llvm-svn: 353759
      b2d24577
    • Evandro Menezes's avatar
      [TargetLibraryInfo] Update run time support for Windows · f4a36959
      Evandro Menezes authored
      It seems that, since VC19, the `float` C99 math functions are supported for all
      targets, unlike the C89 ones.
      
      According to the discussion at https://reviews.llvm.org/D57625.
      
      llvm-svn: 353758
      f4a36959
    • Ana Pazos's avatar
      [LegalizeTypes] Expand FNEG to bitwise op for IEEE FP types · 9a3dc3e6
      Ana Pazos authored
      Summary:
      Except for custom floating point types x86_fp80 and ppc_fp128,
      expand Y = FNEG(X) to Y = X ^ sign mask to avoid library call.
       Using bitwise operation can improve code size and performance.
      
      Reviewers: efriedma
      
      Reviewed By: efriedma
      
      Subscribers: efriedma, kpn, arsenm, eli.friedman, javed.absar, rbar, johnrusso, simoncook, sabuasal, niosHD, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, asb, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D57875
      
      llvm-svn: 353757
      9a3dc3e6
    • Scott Linder's avatar
      [IRReader] Expose getLazyIRModule · 72a0f4e8
      Scott Linder authored
      Currently there is no way to lazy-load an in-memory IR module without
      first writing it to disk. This patch just exposes the existing
      implementation of getLazyIRModule.
      
      This is effectively a revert of rL212364
      
      Differential Revision: https://reviews.llvm.org/D56203
      
      llvm-svn: 353755
      72a0f4e8
    • Matt Arsenault's avatar
      GlobalISel: Implement moreElementsVector for implicit_def · 18ec3826
      Matt Arsenault authored
      llvm-svn: 353754
      18ec3826
    • Matt Arsenault's avatar
      GlobalISel: Fix not calling the observer when legalizing G_EXTRACT · 68fc38ce
      Matt Arsenault authored
      llvm-svn: 353750
      68fc38ce
    • Daniel Sanders's avatar
      [globalisel] Correct string emitted by GISelChangeObserver::erasingInstr() · 24e0af69
      Daniel Sanders authored
      The API indicates that the MI is about to be erased rather than it has been erased.
      
      llvm-svn: 353746
      24e0af69
    • Craig Topper's avatar
      [X86] Correct the memory operand for the FLD emitted in FP_TO_INTHelper for 32-bit SSE targets. · 75eb0af8
      Craig Topper authored
      We were using DstTy, but that represents the integer type we are converting to which is i64 in this
      case. The FLD is part of an intermediate step to get from the SSE registers to the x87 registers.
      If the floating point type is f32, the memory operand should reflect a 4 byte access not an 8 byte
      access. The store we used to get from SSE to the stack is using the corect size.
      
      While there, consistenly use TheVT in place of Op.getOperand(0).getValueType() throughout the function.
      
      llvm-svn: 353745
      75eb0af8
    • Matt Davis's avatar
      [llvm-cxxfilt] Split and demangle stdin input · 22c21934
      Matt Davis authored
      Summary:
      Originally, llvm-cxxfilt would treat a line as a single mangled item to be demangled.
      If a mangled name appears in the middle of that string, that name would not be demangled.
      
      GNU c++filt  splits and demangles every word  in a  string that is piped to it via stdin.
      Prior to this patch llvm-cxxfilt would never split strings  piped to it.
      This patch replicates the GNU behavior and splits strings that are piped to it via stdin.
      
      This fixes PR39990
      
      Reviewers: compnerd, jhenderson, davide
      
      Reviewed By: compnerd, jhenderson
      
      Subscribers: erik.pilkington, jhenderson, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D57350
      
      llvm-svn: 353743
      22c21934
    • Daniel Sanders's avatar
    • Alina Sbirlea's avatar
      [MemorySSA] Remove verifyClobberSanity. · d77edc00
      Alina Sbirlea authored
      Summary:
      This verification may fail after certain transformations due to
      BasicAA's fragility. Added a small explanation and a testcase that
      triggers the assert in checkClobberSanity (before its removal).
      Addresses PR40509.
      
      Reviewers: george.burgess.iv
      
      Subscribers: sanjoy, jlebar, llvm-commits, Prazek
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D57973
      
      llvm-svn: 353739
      d77edc00
    • Michael Kruse's avatar
      Refactor setAlreadyUnrolled() and setAlreadyVectorized(). · 77a614a6
      Michael Kruse authored
      Loop::setAlreadyUnrolled() and
      LoopVectorizeHints::setLoopAlreadyUnrolled() both add loop metadata that
      stops the same loop from being transformed multiple times. This patch
      merges both implementations.
      
      In doing so we fix 3 potential issues:
      
       * setLoopAlreadyUnrolled() kept the llvm.loop.vectorize/interleave.*
         metadata even though it will not be used anymore. This already caused
         problems such as http://llvm.org/PR40546. Change the behavior to the
         one of setAlreadyUnrolled which deletes this loop metadata.
      
       * setAlreadyUnrolled() used to create a new LoopID by calling
         MDNode::get with nullptr as the first operand, then replacing it by
         the returned references using replaceOperandWith. It is possible
         that MDNode::get would instead return an existing node (due to
         de-duplication) that then gets modified. To avoid, use a fresh
         TempMDNode that does not get uniqued with anything else before
         replacing it with replaceOperandWith.
      
       * LoopVectorizeHints::matchesHintMetadataName() only compares the
         suffix of the attribute to set the new value for. That is, when
         called with "enable", would erase attributes such as
         "llvm.loop.unroll.enable", "llvm.loop.vectorize.enable" and
         "llvm.loop.distribute.enable" instead of the one to replace.
         Fortunately, function was only called with "isvectorized".
      
      Differential Revision: https://reviews.llvm.org/D57566
      
      llvm-svn: 353738
      77a614a6
    • Sanjay Patel's avatar
      [InstCombine] Fix matchRotate bug when one operand is a ConstantExpr shift · 587fd849
      Sanjay Patel authored
      This bug seems to be harmless in release builds, but will cause an error in UBSAN
      builds or an assertion failure in debug builds.
      
      When it gets to this opcode comparison, it assumes both of the operands are BinaryOperators,
      but the prior m_LogicalShift will also match a ConstantExpr. The cast<BinaryOperator> will
      assert in a debug build, or reading an invalid value for BinaryOp from memory with
      ((BinaryOperator*)constantExpr)->getOpcode() will cause an error in a UBSAN build.
      
      The test I added will fail without this change in debug/UBSAN builds, but not in release.
      
      Patch by: @AndrewScheidecker (Andrew Scheidecker)
      
      Differential Revision: https://reviews.llvm.org/D58049
      
      llvm-svn: 353736
      587fd849
    • Bjorn Pettersson's avatar
      [SelectionDAGBuilder] Add restrictions to EmitFuncArgumentDbgValue · 4892f06e
      Bjorn Pettersson authored
      Summary:
      This patch fixes PR40587.
      
      When a dbg.value instrinsic is emitted to the DAG
      by using EmitFuncArgumentDbgValue the resulting
      DBG_VALUE is hoisted to the beginning of the entry
      block. I think the idea is to be able to locate
      a formal argument already from the start of the
      function.
      However, EmitFuncArgumentDbgValue only checked that
      the value that was used to describe a variable was
      originating from a function parameter, not that the
      variable itself actually was an argument to the
      function. So when for example assigning a local
      variable "local" the value from an argument "a",
      the assocated DBG_VALUE instruction would be hoisted
      to the beginning of the function, even if the scope
      for "local" started somewhere else (or if "local"
      was mapped to other values earlier in the function).
      
      This patch adds some logic to EmitFuncArgumentDbgValue
      to check that the variable being described actually
      is an argument to the function. And that the dbg.value
      being lowered already is in the entry block. Otherwise
      we bail out, and the dbg.value will be handled as an
      ordinary dbg.value (not as a "FuncArgumentDbgValue").
      
      A tricky situation is when both the variable and
      the value is related to function arguments, but not
      neccessarily the same argument. We make sure that we
      do not describe the same argument more than once as
      a "FuncArgumentDbgValue". This solution works as long
      as opt has injected a "first" dbg.value that corresponds
      to the formal argument at the function entry.
      
      Reviewers: jmorse, aprantl
      
      Subscribers: jyknight, hiraditya, fedor.sergeev, dstenb, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D57702
      
      llvm-svn: 353735
      4892f06e
    • Alina Sbirlea's avatar
      [LICM&MSSA] Limit store hoisting. · 605b2173
      Alina Sbirlea authored
      Summary:
      If there is no clobbering access for a store inside the loop, that store
      can only be hoisted if there are no interfearing loads.
      A more general verification introduced here: there are no loads that are
      not optimized to an access outside the loop.
      Addresses PR40586.
      
      Reviewers: george.burgess.iv
      
      Subscribers: sanjoy, jlebar, Prazek, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D57967
      
      llvm-svn: 353734
      605b2173
    • Evandro Menezes's avatar
      [TargetLibraryInfo] Update run time support for Windows · 4b86c474
      Evandro Menezes authored
      It seems that the run time for Windows has changed and supports more math
      functions than it used to, especially on AArch64, ARM, and AMD64.
      
      Fixes PR40541.
      
      Differential revision: https://reviews.llvm.org/D57625
      
      llvm-svn: 353733
      4b86c474
    • Jessica Paquette's avatar
      [AArch64][GlobalISel] Add isel support for a couple vector exts/truncs · e57fe23f
      Jessica Paquette authored
      Add support for
      
      - v4s16 <-> v4s32
      - v2s64 <-> v2s32
      
      And update tests that use them to show that we generate the correct
      instructions.
      
      Differential Revision: https://reviews.llvm.org/D57832
      
      llvm-svn: 353732
      e57fe23f
    • Jessica Paquette's avatar
      [GlobalISel][AArch64] NFC: Remove unnecessary IR from select-fp-casts.mir · 828de9fc
      Jessica Paquette authored
      The IR section in this test doesn't do anything, so there's no point in it
      being there. Since it's redundant, just remove it.
      
      llvm-svn: 353731
      828de9fc
    • Jordan Rupprecht's avatar
      [DebugInfo] Fix /usr/lib/debug llvm-symbolizer lookup with relative paths · 5b7ad427
      Jordan Rupprecht authored
      Summary:
      rL189250 added a realpath call, and rL352916 because realpath breaks assumptions with some build systems. However, the /usr/lib/debug case has been clarified, falling back to /usr/lib/debug is currently broken if the obj passed in is a relative path. Adding a call to use absolute paths when falling back to /usr/lib/debug fixes that while still not making any realpath assumptions.
      
      This also adds a --fallback-debug-path command line flag for testing (since we probably can't write to /usr/lib/debug from buildbot environments), but was also verified manually:
      
      ```
      $ rm -f path/to/dwarfdump-test.elf-x86-64
      $ strace llvm-symbolizer --obj=relative/path/to/dwarfdump-test.elf-x86-64.debuglink 0x40113f |& grep dwarfdump
      ```
      
      Lookups went to relative/path/to/dwarfdump-test.elf-x86-64, relative/path/to/.debug/dwarfdump-test.elf-x86-64, and then finally /usr/lib/debug/absolute/path/to/dwarfdump-test.elf-x86-64.
      
      Reviewers: dblaikie, samsonov
      
      Reviewed By: dblaikie
      
      Subscribers: krytarowski, aprantl, hiraditya, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D57916
      
      llvm-svn: 353730
      5b7ad427
    • Andrea Di Biagio's avatar
      [MCA][Scheduler] Track resources that were found busy when issuing an instruction. · 23ff2aa4
      Andrea Di Biagio authored
      This is a follow up of r353706. When the scheduler fails to issue a ready
      instruction to the underlying pipelines, it now updates a mask of 'busy resource
      units'. That information will be used in future to obtain the set of
      "problematic" resources in the case of bottlenecks caused by resource pressure.
      No functional change intended.
      
      llvm-svn: 353728
      23ff2aa4
    • Roland Froese's avatar
      [PowerPC] Avoid scalarization of vector truncate · 732fe224
      Roland Froese authored
      The PowerPC code generator currently scalarizes vector truncates that would fit in a vector register, resulting in vector extracts, scalar operations, and vector merges. This patch custom lowers a vector truncate that would fit in a register to a vector shuffle instead.
      
      Differential Revision: https://reviews.llvm.org/D56507
      
      llvm-svn: 353724
      732fe224
    • Jessica Paquette's avatar
      [GlobalISel][AArch64] Select G_FFLOOR · ebdb0210
      Jessica Paquette authored
      This teaches the legalizer about G_FFLOOR, and lets us select G_FFLOOR in
      AArch64.
      
      It updates the existing floating point tests, and adds a select-floor.mir test.
      
      Differential Revision: https://reviews.llvm.org/D57486
      
      llvm-svn: 353722
      ebdb0210
    • Jessica Paquette's avatar
      Recommit "[GlobalISel] Add IRTranslator support for G_FFLOOR" · f472f318
      Jessica Paquette authored
      After the changes introduced in r353586, this instruction doesn't cause any
      issues for any backend.
      
      Original review: https://reviews.llvm.org/D57485
      
      llvm-svn: 353720
      f472f318
    • Matt Arsenault's avatar
      GlobalISel: Add G_FCANONICALIZE instruction · 9dba67f4
      Matt Arsenault authored
      llvm-svn: 353719
      9dba67f4
Loading