Skip to content
  1. Jun 19, 2021
  2. Jun 18, 2021
  3. Jun 17, 2021
  4. Jun 18, 2021
  5. Jun 17, 2021
    • Andrew Browne's avatar
      Revert "[DFSan] Cleanup code for platforms other than Linux x86_64." · 39295e92
      Andrew Browne authored
      This reverts commit 8441b993.
      
      Buildbot failures.
      39295e92
    • Fangrui Song's avatar
      [InstrProfiling] Make __profd_ unconditionally private for ELF · 76d0747e
      Fangrui Song authored
      For ELF, since all counters/data are in a section group (either `comdat any` or
      `comdat noduplicates`), and the signature for `comdat any` is `__profc_`, the
      D1003372 optimization prerequisite (linker GC cannot discard data variables
      while the text section is retained) is always satisified, we can make __profd_
      unconditionally private.
      
      Reviewed By: davidxl, rnk
      
      Differential Revision: https://reviews.llvm.org/D103717
      76d0747e
    • Craig Topper's avatar
      [PartiallyInlineLibCalls] Disable sqrt expansion for strictfp. · 99e95856
      Craig Topper authored
      This pass emits a floating point compare and a conditional branch,
      but if strictfp is enabled we don't emit a constrained compare
      intrinsic.
      
      The backend also won't expand the readonly sqrt call this pass inserts
      to a sqrt instruction under strictfp. So we end up with 2 libcalls as
      seen here. https://godbolt.org/z/oax5zMEWd
      
      Fix these things by disabling the pass.
      
      Differential Revision: https://reviews.llvm.org/D104479
      99e95856
    • Andrew Browne's avatar
      [DFSan] Cleanup code for platforms other than Linux x86_64. · 8441b993
      Andrew Browne authored
      These other platforms are unsupported and untested.
      They could be re-added later based on MSan code.
      
      Reviewed By: gbalats, stephan.yichao.zhao
      
      Differential Revision: https://reviews.llvm.org/D104481
      8441b993
    • Nikita Popov's avatar
      [LoopUnroll] Fold all exits based on known trip count/multiple · f7c54c46
      Nikita Popov authored
      Fold all exits based on known trip count/multiple information from
      SCEV. Previously only the latch exit or the single exit were folded.
      
      This doesn't yet eliminate ULO.TripCount and ULO.TripMultiple
      entirely: They're still used to a) decide whether runtime unrolling
      should be performed and b) for ORE remarks. However, the core
      unrolling logic is independent of them now.
      
      Differential Revision: https://reviews.llvm.org/D104203
      f7c54c46
    • Roman Lebedev's avatar
      [NFC] LoopVectorizationCostModel::getMaximizedVFForTarget(): clarify debug msg · 37dfc467
      Roman Lebedev authored
      This really isn't talking about vectors in general,
      but only about either fixed or scalable vectors,
      and it's pretty confusing to see it state
      that there aren't any vectors :)
      37dfc467
    • hyeongyukim's avatar
      [InstCombine] Fix miscompile on GEP+load to icmp fold (PR45210) · 69b0ed9a
      hyeongyukim authored
      As noted in PR45210: https://bugs.llvm.org/show_bug.cgi?id=45210
      ...the bug is triggered as Eli say when sext(idx) * ElementSize overflows.
      
      ```
         // assume that GV is an array of 4-byte elements
         GEP = gep GV, 0, Idx // this is accessing Idx * 4
         L = load GEP
         ICI = icmp eq L, value
       =>
         ICI = icmp eq Idx, NewIdx
      ```
      
      The foldCmpLoadFromIndexedGlobal function simplifies GEP+load operation to icmp.
      And there is a problem because Idx * ElementSize can overflow.
      
      Let's assume that the wanted value is at offset 0.
      Then, there are actually four possible values for Idx to match offset 0: 0x00..00, 0x40..00, 0x80..00, 0xC0..00.
      We should return true for all these values, but currently, the new icmp only returns true for 0x00..00.
      
      This problem can be solved by masking off (trailing zeros of ElementSize) bits from Idx.
      
      ```
         ...
       =>
         Idx' = and Idx, 0x3F..FF
         ICI = icmp eq Idx', NewIdx
      ```
      
      Reviewed By: efriedma
      
      Differential Revision: https://reviews.llvm.org/D99481
      69b0ed9a
    • Sjoerd Meijer's avatar
    • Florian Hahn's avatar
      [VPlan] Support PHIs as LastInst when inserting scalars in ::get(). · 80a40334
      Florian Hahn authored
      At the moment, we create insertelement instructions directly after
      LastInst when inserting scalar values in a vector in
      VPTransformState::get.
      
      This results in invalid IR when LastInst is a phi, followed by another
      phi. In that case, the new instructions should be inserted just after
      the last PHI node in the block.
      
      At the moment, I don't think the problematic case can be triggered, but
      it can happen once predicate regions are merged and multiple
      VPredInstPHI recipes are in the same block (D100260).
      
      Reviewed By: Ayal
      
      Differential Revision: https://reviews.llvm.org/D104188
      80a40334
    • Bjorn Pettersson's avatar
      Update @llvm.powi to handle different int sizes for the exponent · 4c7f820b
      Bjorn Pettersson authored
      This can be seen as a follow up to commit 0ee439b7,
      that changed the second argument of __powidf2, __powisf2 and
      __powitf2 in compiler-rt from si_int to int. That was to align with
      how those runtimes are defined in libgcc.
      One thing that seem to have been missing in that patch was to make
      sure that the rest of LLVM also handle that the argument now depends
      on the size of int (not using the si_int machine mode for 32-bit).
      When using __builtin_powi for a target with 16-bit int clang crashed.
      And when emitting libcalls to those rtlib functions, typically when
      lowering @llvm.powi), the backend would always prepare the exponent
      argument as an i32 which caused miscompiles when the rtlib was
      compiled with 16-bit int.
      
      The solution used here is to use an overloaded type for the second
      argument in @llvm.powi. This way clang can use the "correct" type
      when lowering __builtin_powi, and then later when emitting the libcall
      it is assumed that the type used in @llvm.powi matches the rtlib
      function.
      
      One thing that needed some extra attention was that when vectorizing
      calls several passes did not support that several arguments could
      be overloaded in the intrinsics. This patch allows overload of a
      scalar operand by adding hasVectorInstrinsicOverloadedScalarOpd, with
      an entry for powi.
      
      Differential Revision: https://reviews.llvm.org/D99439
      4c7f820b
  6. Jun 16, 2021
Loading