1. Jul 05, 2022
  2. Jul 04, 2022
    • Sander de Smalen's avatar
      [AArch64] Add support for insert/extract for nxv1i1 types. · 5785717e
      Sander de Smalen authored
      This patch adds patterns and tests for subvector insert/extract
      intrinsics to/from all legal predicate types.
      
      Reviewed By: david-arm, kmclaughlin
      
      Differential Revision: https://reviews.llvm.org/D128975
      5785717e
    • Craig Topper's avatar
      [X86] Disable combineVectorSizedSetCCEquality for soft float. · 2bfca356
      Craig Topper authored
      The vector types aren't legal with soft float.
      Also disable under NoImplicitFloat for good measure.
      
      Fixes PR56351.
      
      Differential Revision: https://reviews.llvm.org/D129060
      2bfca356
    • Shraiysh Vaishay's avatar
      [mlir][OpenMP] omp.task translation to LLVM IR · fdf505f3
      Shraiysh Vaishay authored
      This patch adds translation for omp.task from OpenMPDialect to LLVM IR
      Dialect and adds tests for the same.
      
      Depends on D71989
      
      Reviewed By: ftynse, kiranchandramohan, peixin, Meinersbur
      
      Differential Revision: https://reviews.llvm.org/D123919
      fdf505f3
    • Sanjay Patel's avatar
      [SLP] add test for load combining + shuffling; NFC · 10ebaf76
      Sanjay Patel authored
      issue #38821
      10ebaf76
    • Nikita Popov's avatar
      [InstCombine] Avoid ConstantExpr::get() in phi binop fold · abbd684c
      Nikita Popov authored
      Use ConstantFoldBinaryOpOperands() instead, in preparation for not
      all binops having a supported constant expression.
      abbd684c
    • Nikita Popov's avatar
      [Bitcode] Use bitcode input for test (NFC) · 89cb8cae
      Nikita Popov authored
      The constant expression used in the test will become invalid in
      the future. Convert the input into bitcode, so we test that auto-
      upgrade happens gracefully once this is the case.
      89cb8cae
    • Florian Hahn's avatar
      [LTO] Update remark test after 644a965c. · 8471c686
      Florian Hahn authored
      8471c686
    • Peter Waller's avatar
      [LoopVectorize][NFC] Reinstate TTICapture workaround for gcc-6 · c146af3f
      Peter Waller authored
      Fixes #56374.
      c146af3f
    • luxufan's avatar
      [RISCV] Add ADDI instr for computing FrameIndex address · c06d0b4d
      luxufan authored
      RVV doesn't have immediate field for memory addressing. Currently
      we build MachineInstructions in PEI to computing stack offset for
      RVV load store instructions. These instructions were added too late to
      can be optimized by CSE, LICM... passes.
      
      This patch makes FrameIndex SDNodes can't be matched in RVV Load Store
      instruction selection patterns. So that the FrameIndex SDNodes would be
      selected as `ADDI GPR, targetframeindex`.
      
      There are 2 advantages for such change:
      1. Stack objects address computing can be optimized by machine function
      passes.
      2. Since the ADDI instruction's destination register can be used as a
      temp register, we can save an emergency spill slot.
      
      Differential Revision: https://reviews.llvm.org/D128187
      c06d0b4d
    • Florian Hahn's avatar
      [LV] Vectorize cases with larger number of RT checks, execute only if profitable. · 644a965c
      Florian Hahn authored
      This patch replaces the tight hard cut-off for the number of runtime
      checks with a more accurate cost-driven approach.
      
      The new approach allows vectorization with a larger number of runtime
      checks in general, but only executes the vector loop (and runtime checks) if
      considered profitable at runtime. Profitable here means that the cost-model
      indicates that the runtime check cost + vector loop cost < scalar loop cost.
      
      To do that, LV computes the minimum trip count for which runtime check cost
      + vector-loop-cost < scalar loop cost.
      
      Note that there is still a hard cut-off to avoid excessive compile-time/code-size
      increases, but it is much larger than the original limit.
      
      The performance impact on standard test-suites like SPEC2006/SPEC2006/MultiSource
      is mostly neutral, but the new approach can give substantial gains in cases where
      we failed to vectorize before due to the over-aggressive cut-offs.
      
      On AArch64 with -O3, I didn't observe any regressions outside the noise level (<0.4%)
      and there are the following execution time improvements. Both `IRSmk` and `srad` are relatively short running, but the changes are far above the noise level for them on my benchmark system.
      
      ```
      CFP2006/447.dealII/447.dealII    -1.9%
      CINT2017rate/525.x264_r/525.x264_r    -2.2%
      ASC_Sequoia/IRSmk/IRSmk       -9.2%
      Rodinia/srad/srad     -36.1%
      ```
      
      `size` regressions on AArch64 with -O3 are
      
      ```
      MultiSource/Applications/hbd/hbd                 90256.00   106768.00 18.3%
      MultiSourc...ks/ASCI_Purple/SMG2000/smg2000     240676.00   257268.00  6.9%
      MultiSourc...enchmarks/mafft/pairlocalalign     472603.00   489131.00  3.5%
      External/S...2017rate/525.x264_r/525.x264_r     613831.00   630343.00  2.7%
      External/S...NT2006/464.h264ref/464.h264ref     818920.00   835448.00  2.0%
      External/S...te/538.imagick_r/538.imagick_r    1994730.00  2027754.00  1.7%
      MultiSourc...nchmarks/tramp3d-v4/tramp3d-v4    1236471.00  1253015.00  1.3%
      MultiSource/Applications/oggenc/oggenc         2108147.00  2124675.00  0.8%
      External/S.../CFP2006/447.dealII/447.dealII    4742999.00  4759559.00  0.3%
      External/S...rate/510.parest_r/510.parest_r   14206377.00 14239433.00  0.2%
      ```
      
      Reviewed By: lebedev.ri, ebrevnov, dmgreen
      
      Differential Revision: https://reviews.llvm.org/D109368
      644a965c
    • Stella Laurenzo's avatar
      Fix MLIR Python CMake bug causing duplicate sources target. · aa78c529
      Stella Laurenzo authored
      The refactor in https://reviews.llvm.org/D128230 introduced a new target and the name is not scoped properly, leading to name collisions on larger projects. It is done properly on the target just below, so applying the same pattern here fixes the issue.
      aa78c529
    • Nikita Popov's avatar
      [BPI] Avoid ConstantExpr::get() · f93cd562
      Nikita Popov authored
      Use ConstantFoldBinaryOpOperands() instead, to prepare for the case
      where not all binary operators have a constant expression form.
      
      I believe this code actually intended to set OnlyIfReduced=true,
      however ConstantExpr::get() actually accepts a Flags argument at
      that position (and OnlyIfReducedTy as the next argument), so this
      ended up creating a constant expression with some random flag
      (probably exact or nuw depending on which).
      f93cd562
    • Valentin Clement's avatar
      [flang] Avoid segfault when defining op is not a fir::Convert · d7697c17
      Valentin Clement authored
      The previous code made the assumption that the defining
      operation is a fir::ConvertOp without checking. This results in
      segmentation fault in code like the added test.
      
      Reviewed By: jeanPerier
      
      Differential Revision: https://reviews.llvm.org/D129077
      d7697c17
    • Tue Ly's avatar
      [libc] Add a separate algorithm_test. · 4e6c30c8
      Tue Ly authored
      Differential Revision: https://reviews.llvm.org/D128994
      4e6c30c8
    • gbreynoo's avatar
      [llvm-ar][test] Add additional MRI script testing · 2ab260ee
      gbreynoo authored
      This commit adds:
      - Additional test coverage of the DELETE and END commands.
      - File names to be read in the line endings test.
      - A use of ADDLIB in the nonascii test.
      
      Differential Revision: https://reviews.llvm.org/D128838
      2ab260ee
    • David Green's avatar
      [SLP] Peek into loads when hitting the RecursionMaxDepth · 2de05afc
      David Green authored
      This patch slightly extends the limit on the RecursionMaxDepth inside
      the SLP vectorizer. It does it only when it hits a load (or zext/sext of
      a load), which allows it to peek through in the places where it will be
      the most valuable, without ballooning out the O(..) by any 2^n factors.
      
      Differential Revision: https://reviews.llvm.org/D122148
      2de05afc
    • Nikita Popov's avatar
      [Reassociate] Avoid ConstantExpr::get() · 93cbdaef
      Nikita Popov authored
      Use ConstantFoldBinaryOpOperands() instead, to handle the case
      where not all binary ops have a constant expression variant.
      
      This is a bit awkward because we only want to pop the element from
      Ops once we're sure that it has folded.
      93cbdaef
    • Nikita Popov's avatar
      [SCEVExpander] Avoid ConstantExpr::get() (NFCI) · 32a76fc2
      Nikita Popov authored
      Use ConstantFoldBinaryOpOperands() instead. This will be important
      when not all binops have constant expression variants.
      32a76fc2
    • LLVM GN Syncbot's avatar
      [gn build] Port 25607d14 · 3912928a
      LLVM GN Syncbot authored
      3912928a
    • Hui Xie's avatar
      [libc++] Implement `std::ranges::merge` · 25607d14
      Hui Xie authored
      Implement `std::ranges::merge`. added unit tests
      
      Differential Revision: https://reviews.llvm.org/D128611
      25607d14
    • David Green's avatar
      [VectorCombine] Improve shuffle select shuffle-of-shuffles · 19a1e20b
      David Green authored
      This in an extension to the code added in D123911 which added vector
      combine folding of shuffle-select patterns, attempting to reduce the
      total amount of shuffling required in patterns like:
        %x = shuffle %i1, %i2
        %y = shuffle %i1, %i2
        %a = binop %x, %y
        %b = binop %x, %y
        shuffle %a, %b, selectmask
      
      This patch extends the handing of shuffles that are dependent on one
      another, which can arise from the SLP vectorizer, as-in:
        %x = shuffle %i1, %i2
        %y = shuffle %x
      
      The input shuffles can also be emitted, in which case they are treated
      like identity shuffles. This patch also attempts to calculate a better
      ordering of input shuffles, which can help getting lower cost input
      shuffles, pushing complex shuffles further down the tree.
      
      Differential Revision: https://reviews.llvm.org/D128732
      19a1e20b
    • Nikita Popov's avatar
      [AMDGPUCodeGenPrepare] Check result of ConstantFoldBinaryOpOperands() · 8e70258b
      Nikita Popov authored
      This function will become fallible once we don't support constant
      expressions for all binops, so make sure to check the result.
      8e70258b
    • Nikita Popov's avatar
      [ConstantFolding] Check return value of ConstantFoldInstOperandsImpl() · 4905bcac
      Nikita Popov authored
      This operation is fallible, but ConstantFoldConstantImpl() is not.
      If we fail to fold, we should simply return the original expression.
      
      I don't think this can cause any issues right now, but it becomes
      a problem if once make ConstantFoldInstOperandsImpl() not create a
      constant expression for everything it possibly could.
      4905bcac
    • Valentin Clement's avatar
      [flang] Add TODO for derived types with final procedure · 740633ff
      Valentin Clement authored
      Finalization is F2003 and although the runtime supports it already,
      lowering is not ensuring all the derived type are finalized properly
      when they should. This will require surveying the places where lowering
      needs to call it. Add a hard TODO for now.
      
      This patch is part of the upstreaming effort from fir-dev branch.
      
      Reviewed By: jeanPerier
      
      Differential Revision: https://reviews.llvm.org/D129069
      
      
      
      Co-authored-by: default avatarJean Perier <jperier@nvidia.com>
      740633ff
    • Sander de Smalen's avatar
      [AArch64] NFC: Move safe predicate casting to a separate function. · bf89d24f
      Sander de Smalen authored
      This patch puts the code to safely bitcast a predicate, and possibly zero
      any undefined lanes when doing a widening cast, into one place and merges
      the functionality with lowerConvertToSVBool.
      
      This is some cleanup inspired by D128665.
      
      Reviewed By: paulwalker-arm
      
      Differential Revision: https://reviews.llvm.org/D128926
      bf89d24f