1. Aug 17, 2022
    • Craig Topper's avatar
      [RISCV] Add more test cases for (sub C, (setcc x, y, eq/neq)) -> (add C-1,... · 1180ed41
      Craig Topper authored
      [RISCV] Add more test cases for (sub C, (setcc x, y, eq/neq)) -> (add C-1, (setcc x, y, neq/eq)). NFC
      
      In these test cases we do the transform, but the immediate is too
      large to form an ADDI so it didn't save any instructions.
      
      If the constant is opaque or has additional users we shouldn't do
      the transform if it doesn't form an ADDI.
      1180ed41
    • Craig Topper's avatar
      [RISCV] Move test from setcc-logic.ll to select-const.ll. NFC · 4854fa21
      Craig Topper authored
      Also add setne version of the test.
      
      Add some common prefixes to reduce number of identical CHECK lines.
      4854fa21
    • Peiming Liu's avatar
      [mlir][sparse] Implements concatenate operation for sparse tensor · c248219b
      Peiming Liu authored
      This patch implements the conversion rule for operation introduced in https://reviews.llvm.org/D131200.
      Also contains integration test for correctness
      
      Reviewed By: aartbik
      
      Differential Revision: https://reviews.llvm.org/D131200
      c248219b
    • Siva Chandra Reddy's avatar
    • Craig Topper's avatar
      [RISCV] (sub C, (setcc x, y, eq/neq)) -> (add C-1, (setcc x, y, neq/eq)) fold for FP setcc. · 4184edc6
      Craig Topper authored
      This introduce an xori in some cases. I don't believe it was the
      intention of the original patch. This was an accident because
      nonan FP equality compares also use SETEQ/SETNE.
      
      Also pass the correct type to getSetCCInverse.
      4184edc6
    • Craig Topper's avatar
      [RISCV] Add test cases to show where we inverted a fp setcc and introduced an extra xori. · 87e78372
      Craig Topper authored
      In these tests we had (sub C, (seteq X, Y)) which we converted to
      the (add (setne X, Y), C-1). We don't have a FNE compare instruction
      so this created an XORI to invert an FEQ instruction.
      
      This might be a good idea since it can save a constant materialization,
      but does not appear to be the intention of the original patch.
      87e78372
    • Craig Topper's avatar
      [RISCV] Minor cleanups to performSUBCombine. NFC · c7e58836
      Craig Topper authored
      -Rename variable NnzC -> N0C.
      -Use SelectionDAG::getSetCC to reduce code.
      -Use SDValue::getOperand instead of operator-> and SDNode::getOperand.
      
      Initial steps to add another similar combine to this code.
      c7e58836
    • Kazu Hirata's avatar
      [lldb] Fix warnings · 50630dcc
      Kazu Hirata authored
      This patch fixes:
      
        lldb/source/Plugins/Instruction/RISCV/EmulateInstructionRISCV.h:34:5:
        error: default label in switch which covers all enumeration values
        [-Werror,-Wcovered-switch-default]
      
      and:
      
        lldb/source/Plugins/Instruction/RISCV/EmulateInstructionRISCV.cpp:194:21:
        error: comparison of integers of different signs: 'int' and 'size_t'
        (aka 'unsigned long') [-Werror,-Wsign-compare]
      50630dcc
    • Roy Jacobson's avatar
      [Sema] Fix friend destructor declarations after D130936 · 68786f06
      Roy Jacobson authored
      I accidentally broke friend destructor declarations in D130936.
      
      Modify it to skip performing the destructor name check if we have a dependent friend declaration.
      
      Reviewed By: hubert.reinterpretcast
      
      Differential Revision: https://reviews.llvm.org/D131541
      68786f06
    • Sanjay Patel's avatar
      [FlattenCFG] avoid crash on malformed code · ce081776
      Sanjay Patel authored
      We don't have a dominator tree in this pass, so we
      can't bail out sooner by checking for unreachable
      code, but this is a minimal fix for the example in
      issue #56875.
      ce081776
    • Lei Huang's avatar
      [NFC][PowerPC] Add missing NOCOMPAT checks for builtins-ppc-xlcompat.c · 7d8ae9f7
      Lei Huang authored
      Followup patch to address request from https://reviews.llvm.org/D124093
      
      Reviewed By: amyk
      
      Differential Revision: https://reviews.llvm.org/D131622
      7d8ae9f7
    • Dmitri Gribenko's avatar
      [clang][dataflow] Use llvm::is_contained() · 941959d6
      Dmitri Gribenko authored
      Reviewed By: samestep, xazax.hun
      
      Differential Revision: https://reviews.llvm.org/D131975
      941959d6
    • Nicolas Miller's avatar
      Fix subrange liveness checking at rematerialization · ccfabfbb
      Nicolas Miller authored
      This patch fixes an issue where an instruction reading a whole register would be moved during register allocation into a spot where one of the subregisters was dead.
      
      The code to check whether an instruction can be rematerialized at a given point or not was already checking for subranges to ensure that subregisters are live, but only when the instruction being moved was using a subregister, this patch changes that so the subranges are checked even when the moved instruction uses the full register.
      
      This patch also adds a case to the original test for the subrange checking that trigger the issue described above.
      
      The original subrange checking code was introduced in this revision: https://reviews.llvm.org/D115278
      
      And I've encountered this issue on AMDGPUs while working with DPC++: https://github.com/intel/llvm/issues/6209
      
      Essentially the greedy register allocator attempts to move the following instruction:
      
      ```
      %3961:vreg_64 = V_LSHLREV_B64_e64 3, %3078:vreg_64, implicit $exec
      ```
      
      From `@3440` into the body of a loop `@16312`, but `%3078` has the following live ranges:
      
      ```
      %3078 [2224r,2240r:0)[2240r,3488B:1)[16192B,38336B:1) 0@2224r 1@2240r  L0000000000000003 [2224r,3440r:0) 0@2224r  L000000000000000C [2240r,3488B:0)[16192B,38336B:0) 0@2240r
      ```
      
      So `@16312e` `%3078.sub1` is alive but `%3078.sub0` is dead, so this instruction being moved there leads to invalid memory accesses as `3078.sub0` ends up being trashed and the result of this instruction is used as part of an address calculation for a load.
      
      On the original ticket this issue showed up on gfx906 and gfx90a but not on gfx908, this turned out to be because on gfx908 instead of moving the shift instruction into the loop, its value is spilled into an ACC register, gfx906 doesn't have ACC registers and for gfx90a ACC registers are used like regular vector registers and so aren't used for spilling.
      
      With this patch the original application from the DPC++ ticket works properly on gfx906, and the result of the shift instruction is correctly spilled instead of moving the instruction in the loop.
      
      Original Author: npmiller
      
      Reviewed by: rampitec
      
      Submitted by: rampitec
      
      Differential Revision: https://reviews.llvm.org/D131884
      ccfabfbb
    • David Blaikie's avatar
      Revert "flang: Fix flang build with -Wctad-maybe-unsupported" · fe7450b3
      David Blaikie authored
      -Wctad-maybe-unsupported is now disabled for flang so these explicit
      deduction guides are not required.
      
      This reverts commit 248591aa.
      fe7450b3
    • David Blaikie's avatar
      Revert "Some more from-the-hip ctad-maybe-unsupported fixes for flang" · e2333b55
      David Blaikie authored
      -Wctad-maybe-unsupported is now disabled for flang so these explicit
      deduction guides are not required.
      
      This reverts commit ec3956b6.
      e2333b55
    • David Blaikie's avatar
    • Zequan Wu's avatar
      [LLDB][NativePDB] Add nullptr checking. · 7ebbef2b
      Zequan Wu authored
      7ebbef2b
    • Mark de Wever's avatar
      [libc++] Improve updating data files. · 130b1816
      Mark de Wever authored
      This changes makes it easier to update the Unicode data files used for
      the Extended Graphme Clustering as added in D126971.
      
      Reviewed By: ldionne, #libc
      
      Differential Revision: https://reviews.llvm.org/D129668
      130b1816
    • Mark de Wever's avatar
      [libc++][format] Improve format buffer. · f7c0df00
      Mark de Wever authored
      Allow bulk output operations on the buffer instead of adding one
      code unit at a time. This has a huge performance benefit at the cost of
      larger binary. This doesn't implement @vitaut's earlier suggestion to
      avoid buffering for std::string when writing a strings. That can be done
      in a follow-up patch.
      
      There are some minor complications for the non-buffered format_to_n.
      When writing one character at a time it's easy to detect when reaching
      the limit n. This is solved by adding a small overhead for format_to_n.
      When the next write would overflow it stores the data in the internal
      buffer and copies that up-to n code units. The overhead isn't measured,
      but it's expected to only be an issue for small values of n; for larger
      values the general improvements will outweight the new overhead.
      
      ```
         text	   data	    bss	    dec	    hex	filename
       349081	   6096	    440	 355617	  56d21	format.libcxx.out-baseline
       344442	   6088	    440	 350970	  55afa	formatted_size.libcxx.out-baseline
      4567980	  57272	    424	4625676	 46950c	formatter_float.libcxx.out-baseline
       718800	  12472	    488	 731760	  b2a70	formatter_int.libcxx.out-baseline
       376341	   6096	    552	 382989	  5d80d	format_to.libcxx.out-beaseline
      
       370169	   6096	    440	 376705	  5bf81	format.libcxx.out
       365530	   6088	    440	 372058	  5ad5a	formatted_size.libcxx.out
      4575116	  57272	    424	4632812	 46b0ec	formatter_float.libcxx.out
       725936	  12472	    488	 738896	  b4650	formatter_int.libcxx.out
       397429	   6096	    552	 404077	  62a6d	format_to.libcxx.out
      ```
      
      For very small strings the new method is slower, from 4 characters
      there's already a small gain.
      
      ```
      Comparing ./format.libcxx.out-baseline to ./format.libcxx.out
      Benchmark                                           Time             CPU      Time Old      Time New       CPU Old       CPU New
      --------------------------------------------------------------------------------------------------------------------------------
      BM_format_string<char>/1                         +0.0268         +0.0268            43            44            43            44
      BM_format_string<char>/2                         +0.0133         +0.0133            22            22            22            22
      BM_format_string<char>/4                         -0.0248         -0.0248            12            11            12            11
      BM_format_string<char>/8                         -0.0831         -0.0831             6             6             6             6
      BM_format_string<char>/16                        -0.2976         -0.2976             4             3             4             3
      BM_format_string<char>/32                        -0.4369         -0.4369             3             2             3             2
      BM_format_string<char>/64                        -0.6375         -0.6375             3             1             3             1
      BM_format_string<char>/128                       -0.7685         -0.7685             2             1             2             1
      
      ```
      
      The int benchmark has benefits for the simple formatting, but shines for
      the complex formatting:
      ```
      Comparing ./formatter_int.libcxx.out-baseline to ./formatter_int.libcxx.out
      Benchmark                                                               Time             CPU      Time Old      Time New       CPU Old       CPU New
      ----------------------------------------------------------------------------------------------------------------------------------------------------
      BM_Basic<uint32_t>                                                   -0.2307         -0.2307            60            46            60            46
      BM_Basic<int32_t>                                                    -0.1985         -0.1985            61            49            61            49
      BM_Basic<uint64_t>                                                   -0.3478         -0.3479            81            53            81            53
      BM_Basic<int64_t>                                                    -0.3475         -0.3475            81            53            81            53
      BM_BasicLow<__uint128_t>                                             -0.3388         -0.3388            86            57            86            57
      BM_BasicLow<__int128_t>                                              -0.3431         -0.3431            86            57            86            57
      BM_Basic<__uint128_t>                                                -0.2822         -0.2822           236           170           236           170
      BM_Basic<__int128_t>                                                 -0.3107         -0.3107           219           151           219           151
      Integral_LocFalse_BaseBin_AlignNone_Int64                            -0.5781         -0.5781           178            75           178            75
      Integral_LocFalse_BaseBin_AlignmentLeft_Int64                        -0.9231         -0.9231          1156            89          1156            89
      Integral_LocFalse_BaseBin_AlignmentCenter_Int64                      -0.9179         -0.9179          1107            91          1107            91
      Integral_LocFalse_BaseBin_AlignmentRight_Int64                       -0.9238         -0.9238          1147            87          1147            87
      Integral_LocFalse_BaseBin_ZeroPadding_Int64                          -0.9170         -0.9170          1137            94          1137            94
      Integral_LocFalse_BaseBin_AlignNone_Uint64                           -0.5923         -0.5923           175            71           175            71
      Integral_LocFalse_BaseBin_AlignmentLeft_Uint64                       -0.9251         -0.9251          1154            86          1154            86
      Integral_LocFalse_BaseBin_AlignmentCenter_Uint64                     -0.9204         -0.9204          1105            88          1105            88
      Integral_LocFalse_BaseBin_AlignmentRight_Uint64                      -0.9242         -0.9242          1125            85          1125            85
      Integral_LocFalse_BaseBin_ZeroPadding_Uint64                         -0.9232         -0.9232          1139            88          1139            88
      Integral_LocFalse_BaseOct_AlignNone_Int64                            -0.3241         -0.3241           100            67           100            67
      Integral_LocFalse_BaseOct_AlignmentLeft_Int64                        -0.9322         -0.9322          1166            79          1166            79
      Integral_LocFalse_BaseOct_AlignmentCenter_Int64                      -0.9251         -0.9251          1108            83          1108            83
      Integral_LocFalse_BaseOct_AlignmentRight_Int64                       -0.9303         -0.9303          1136            79          1136            79
      Integral_LocFalse_BaseOct_ZeroPadding_Int64                          -0.9264         -0.9264          1156            85          1156            85
      Integral_LocFalse_BaseOct_AlignNone_Uint64                           -0.3116         -0.3116            96            66            96            66
      Integral_LocFalse_BaseOct_AlignmentLeft_Uint64                       -0.9310         -0.9310          1168            81          1168            81
      Integral_LocFalse_BaseOct_AlignmentCenter_Uint64                     -0.9281         -0.9281          1128            81          1128            81
      Integral_LocFalse_BaseOct_AlignmentRight_Uint64                      -0.9299         -0.9299          1148            80          1148            80
      Integral_LocFalse_BaseOct_ZeroPadding_Uint64                         -0.9288         -0.9288          1153            82          1153            82
      Integral_LocFalse_BaseDec_AlignNone_Int64                            -0.3342         -0.3342            95            63            95            63
      Integral_LocFalse_BaseDec_AlignmentLeft_Int64                        -0.9360         -0.9360          1157            74          1157            74
      Integral_LocFalse_BaseDec_AlignmentCenter_Int64                      -0.9303         -0.9303          1128            79          1128            79
      Integral_LocFalse_BaseDec_AlignmentRight_Int64                       -0.9369         -0.9369          1164            73          1164            73
      Integral_LocFalse_BaseDec_ZeroPadding_Int64                          -0.9323         -0.9323          1157            78          1157            78
      Integral_LocFalse_BaseDec_AlignNone_Uint64                           -0.3198         -0.3198            93            63            93            63
      Integral_LocFalse_BaseDec_AlignmentLeft_Uint64                       -0.9351         -0.9351          1158            75          1158            75
      Integral_LocFalse_BaseDec_AlignmentCenter_Uint64                     -0.9298         -0.9298          1128            79          1128            79
      Integral_LocFalse_BaseDec_AlignmentRight_Uint64                      -0.9361         -0.9361          1157            74          1157            74
      Integral_LocFalse_BaseDec_ZeroPadding_Uint64                         -0.9333         -0.9333          1151            77          1151            77
      Integral_LocFalse_BaseHex_AlignNone_Int64                            -0.3020         -0.3020            89            62            89            62
      Integral_LocFalse_BaseHex_AlignmentLeft_Int64                        -0.9357         -0.9357          1174            75          1174            75
      Integral_LocFalse_BaseHex_AlignmentCenter_Int64                      -0.9319         -0.9319          1129            77          1129            77
      Integral_LocFalse_BaseHex_AlignmentRight_Int64                       -0.9350         -0.9350          1161            75          1161            75
      Integral_LocFalse_BaseHex_ZeroPadding_Int64                          -0.9293         -0.9293          1150            81          1150            81
      Integral_LocFalse_BaseHex_AlignNone_Uint64                           -0.3056         -0.3057            86            59            86            59
      Integral_LocFalse_BaseHex_AlignmentLeft_Uint64                       -0.9378         -0.9378          1174            73          1174            73
      Integral_LocFalse_BaseHex_AlignmentCenter_Uint64                     -0.9341         -0.9341          1129            74          1130            74
      Integral_LocFalse_BaseHex_AlignmentRight_Uint64                      -0.9361         -0.9361          1157            74          1157            74
      Integral_LocFalse_BaseHex_ZeroPadding_Uint64                         -0.9315         -0.9315          1147            79          1147            79
      Integral_LocFalse_BaseHexUpper_AlignNone_Int64                       -0.0019         -0.0019            91            90            91            90
      Integral_LocFalse_BaseHexUpper_AlignmentLeft_Int64                   -0.9099         -0.9099          1162           105          1162           105
      Integral_LocFalse_BaseHexUpper_AlignmentCenter_Int64                 -0.9041         -0.9041          1121           108          1121           108
      Integral_LocFalse_BaseHexUpper_AlignmentRight_Int64                  -0.9086         -0.9086          1162           106          1162           106
      Integral_LocFalse_BaseHexUpper_ZeroPadding_Int64                     -0.9057         -0.9057          1164           110          1164           110
      Integral_LocFalse_BaseHexUpper_AlignNone_Uint64                      +0.0110         +0.0110            86            87            86            87
      Integral_LocFalse_BaseHexUpper_AlignmentLeft_Uint64                  -0.9136         -0.9136          1161           100          1161           100
      Integral_LocFalse_BaseHexUpper_AlignmentCenter_Uint64                -0.9078         -0.9078          1133           104          1133           104
      Integral_LocFalse_BaseHexUpper_AlignmentRight_Uint64                 -0.9132         -0.9132          1177           102          1177           102
      Integral_LocFalse_BaseHexUpper_ZeroPadding_Uint64                    -0.9091         -0.9091          1160           105          1160           105
      ```
      Other benchmarks give similar results.
      
      Reviewed By: #libc, ldionne
      
      Differential Revision: https://reviews.llvm.org/D129964
      f7c0df00
    • Vitaly Buka's avatar
      69c09d11
    • Slava Zakharin's avatar
      [mlir][math] Added basic support for FPowI operation. · f9d988f1
      Slava Zakharin authored
      The operation computes pow(b, p), where 'b' is floating point
      and 'p' is a signed integer. The result's type matches 'b' type.
      The operands must have the same shape.
      
      Differential Revision: https://reviews.llvm.org/D129811
      f9d988f1
    • Steven Wu's avatar
      [CMake] Cleanup the descriptions for gRPC options · 07c2f592
      Steven Wu authored
      As a followup to https://reviews.llvm.org/D131593, clean up gRPC related
      option names and messages to make them more generic.
      07c2f592
    • David Blaikie's avatar
  2. Aug 16, 2022
    • Simon Pilgrim's avatar
      [ValueTracking] computeKnownBits - attempt to use a branch condition feeding a... · 08d153d8
      Simon Pilgrim authored
      [ValueTracking] computeKnownBits - attempt to use a branch condition feeding a phi to improve known bits range (PR38280)
      
      If computeKnownBits encounters a phi node, and we fail to determine any known bits through direct analysis, see if the incoming value is part of a branch condition feeding the phi.
      
      Handle cases where icmp(IncomingValue PRED Constant) is driving a branch instruction feeding that phi node - at the moment this only handles EQ/ULT/ULE predicate cases as they are the most straightforward to handle and most likely for branch-loop 'max upper bound' cases - we can extend this if/when necessary.
      
      I investigated a more general icmp(LHS PRED RHS) KnownBits system, but the hard limits we put on value tracking depth through phi nodes meant that we were mainly catching constants anyhow.
      
      Fixes the pointless vectorization in PR38280 / Issue #37628 (excessive unrolling still needs handling though)
      
      Differential Revision: https://reviews.llvm.org/D131838
      08d153d8
    • Emmmer's avatar
      [LLDB][RISCV] Make software single stepping work · 4fc7e9cb
      Emmmer authored
      Add:
      - `EmulateInstructionRISCV`, which can be used for riscv32 and riscv64.
      - Add unittests for EmulateInstructionRISCV.
      
      Note: Compressed instructions set (RVC) was still not supported in this patch.
      
      Reviewed By: DavidSpickett
      
      Differential Revision: https://reviews.llvm.org/D131759
      4fc7e9cb
    • Emmmer's avatar
      [LLDB] Handle possible resume thread error · 8ed3e75c
      Emmmer authored
      In this switch case we didn't handle possible errors in `ResumeThread()`, it's hard to get helpful information when it goes wrong.
      
      Reviewed By: DavidSpickett
      
      Differential Revision: https://reviews.llvm.org/D131946
      8ed3e75c
    • Emmmer's avatar
      [LLDB] Fix possible nullptr exception · 95e2949a
      Emmmer authored
      Some architectures do not have a flag register (like riscv).
      In this case, we should set it to `baton.m_register_values.end()` to avoid nullptr exception.
      
      Reviewed By: DavidSpickett
      
      Differential Revision: https://reviews.llvm.org/D131945
      95e2949a
    • Florian Hahn's avatar
      [PhaseOrdering] Add test showing excessive unrolling of vector loop. · 1638ad1e
      Florian Hahn authored
      Test cases based on #42332 showing excessive unrolling with both known
      and runtime trip counts.
      1638ad1e
    • Arthur Eubanks's avatar
      [Windows] Put init_seg(compiler/lib) in llvm.global_ctors · 9181ce62
      Arthur Eubanks authored
      Currently we treat initializers with init_seg(compiler/lib) as similar
      to any other init_seg, they simply have a global variable in the proper
      section (".CRT$XCC" for compiler/".CRT$XCL" for lib) and are added to
      llvm.used. However, this doesn't match with how LLVM sees normal (or
      init_seg(user)) initializers via llvm.global_ctors. This
      causes issues like incorrect init_seg(compiler) vs init_seg(user)
      ordering due to GlobalOpt evaluating constructors, and the
      ability to remove init_seg(compiler/lib) initializers at all.
      
      Currently we use 'A' for priorities less than 200. Use 200 for
      init_seg(compiler) (".CRT$XCC") and 400 for init_seg(lib) (".CRT$XCL"),
      which do not append the priority to the section name. Priorities
      between 200 and 400 use ".CRT$XCC${Priority}". This allows for
      some wiggle room for people/future extensions that want to add
      initializers between compiler and lib.
      
      Fixes #56922
      
      Reviewed By: rnk
      
      Differential Revision: https://reviews.llvm.org/D131910
      9181ce62
    • Fred Tingaud's avatar
      MSVC compatibility mode: fix error on unqualified templated base class... · ba1c396e
      Fred Tingaud authored
      MSVC compatibility mode: fix error on unqualified templated base class initialization in case of partial specialization
      
      I introduced a patch to handle unqualified templated base class
      initialization in MSVC compatibility mode:
      https://reviews.llvm.org/rGc894e85fc64dd8d83b460de81080fff93c5ca334
      We identified a problem with this patch in the case where the base class
      is partially specialized, which can lead to triggering an assertion in
      the case of a mix between types and values.
      The minimal test case is:
      
        template <typename Type, int TSize> class Vec {};
        template <int TDim> class Index : public Vec<int, TDim> {
          Index() : Vec() {}
        };
        template class Index<0>;
      
      The detailed problem is that I was using the
      `InjectedClassNameSpecialization`, to which the class template arguments
      were then applied in order. But in the process, we were losing all the
      partial specializations of the base class and creating an index mismatch
      between the expected and passed arguments.
      
      Patch By: frederic-tingaud-sonarsource
      
      Reviewed By: rnk
      
      Differential Revision: https://reviews.llvm.org/D130709
      ba1c396e
    • Danila Malyutin's avatar
      [RS4GC] Handle vectors of pointers in non-live clobbering · 451497a0
      Danila Malyutin authored
      Fix crash when trying to unconditionally cast alloca type to PointerType
      
      Differential Revision: https://reviews.llvm.org/D131146
      451497a0
    • Simon Pilgrim's avatar
      [InstCombine] known-phi-br.ll - remove multiuse handling from tests · f5f4ed87
      Simon Pilgrim authored
      Based off discussion with @spatel for D131838 - InstCombine will still canonicalize the predicates enough that the @use() multiuses aren't helping
      f5f4ed87
    • Steve Merritt's avatar
      [CodeView] Use non-qualified names for static local variables · ec60fca7
      Steve Merritt authored
      Static variables declared within a routine or lexical block should
      be emitted with a non-qualified name.  This allows the variables to
      be visible to the Visual Studio watch window.
      
      Differential Revision: https://reviews.llvm.org/D131400
      ec60fca7
    • Alexey Bataev's avatar
      [SLP]Fix PR51320: Try to vectorize single store operands. · 65c7cecb
      Alexey Bataev authored
      Currently, we try to vectorize values, feeding into stores, only if
      slp-vectorize-hor-store option is provided. We can safely enable
      vectorization of the value operand of a single store in the basic block,
      if the operand value is used only in store.
      It should enable extra vectorization and should not increase compile
      time significantly.
      Fixes https://github.com/llvm/llvm-project/issues/51320
      
      Differential Revision: https://reviews.llvm.org/D131894
      65c7cecb
    • David Spickett's avatar
      [LLVM][Debuginfod] Add missing thread include · b812db14
      David Spickett authored
      One of our silent bots is currently failing:
      https://lab.llvm.org/staging/#/builders/171/builds/169
      
      With:
      <...>/Debuginfod.cpp:298:23: error: no type named 'sleep_for' in namespace 'std::this_thread'
          std::this_thread::sleep_for(Interval);
          ~~~~~~~~~~~~~~~~~~^
      
      Add missing thread include to that file,
      which is what all the other users of sleep_for do.
      
      I think we are seeing this now because we disabled
      llvm threading for this builder. Maybe debuginfod should account
      for that but that's for another time.
      b812db14
    • Louis Dionne's avatar
      [clang][Darwin] Re-apply "Always set the default C++ Standard Library to libc++" · 65d83ba3
      Louis Dionne authored
      Newer SDKs don't even provide libstdc++ headers, so it's effectively
      never valid to build for libstdc++ unless the user explicitly asks
      for it (in which case they will need to provide include paths and more).
      
      This is a re-application of c5ccb78a which had been reverted in
      33171df9 because it broke the Fuchsia CI bots. The issue was that
      the test was XPASSing because it didn't fail anymore when the
      CLANG_DEFAULT_CXX_LIB was set to libc++, which seems to be done for
      Fuchsia. Instead, the test only fails if CLANG_DEFAULT_CXX_LIB is
      set to libstdc++.
      
      As a fly-by fix, also adjust the triple used by various tests to
      something that is supported. Those tests were shown to fail on
      internal bots.
      
      Differential Revision: https://reviews.llvm.org/D131274
      65d83ba3
    • Zain Jaffal's avatar
      [instcombine] Test for zero initialisation optimisation of a product given fast flags · 468a9d6d
      Zain Jaffal authored
      Precommit tests for D131672.
      
      Reviewed By: fhahn
      
      Differential Revision: https://reviews.llvm.org/D131757
      468a9d6d
    • Kevin P. Neal's avatar
      Fix build error: [FPEnv][EarlyCSE] Support for CSE when exception behavior is... · 7f768371
      Kevin P. Neal authored
      Fix build error: [FPEnv][EarlyCSE] Support for CSE when exception behavior is "ignore" or "maytrap" and the rounding mode is known.
      
      This should fix these build bot errors:
      
      Step 6 (build-check-mlir-build-only) failure: build (failure)
      C:\buildbot\mlir-x64-windows-ninja\llvm-project\llvm\lib\Transforms\Scalar\EarlyCSE.cpp(124): error C2220: the following warning is treated as an error
      C:\buildbot\mlir-x64-windows-ninja\llvm-project\llvm\lib\Transforms\Scalar\EarlyCSE.cpp(124): warning C4996: 'llvm::Optional<llvm::fp::ExceptionBehavior>::getValue': Use value instead.
      C:\buildbot\mlir-x64-windows-ninja\llvm-project\llvm\lib\Transforms\Scalar\EarlyCSE.cpp(129): warning C4996: 'llvm::Optional<llvm::RoundingMode>::getValue': Use value instead.
      C:\buildbot\mlir-x64-windows-ninja\llvm-project\llvm\lib\Transforms\Scalar\EarlyCSE.cpp(1386): warning C4996: 'llvm::Optional<llvm::fp::ExceptionBehavior>::getValue': Use value instead.
      C:\buildbot\mlir-x64-windows-ninja\llvm-project\llvm\lib\Transforms\Scalar\EarlyCSE.cpp(1388): warning C4996: 'llvm::Optional<llvm::RoundingMode>::getValue': Use value instead.
      7f768371
    • YingChi Long's avatar
    • Kevin P. Neal's avatar
      [FPEnv][EarlyCSE] Support for CSE when exception behavior is "ignore" or... · 05ac82de
      Kevin P. Neal authored
      [FPEnv][EarlyCSE] Support for CSE when exception behavior is "ignore" or "maytrap" and the rounding mode is known.
      
      Previously we would only CSE constrained FP intrinsics in the default
      floating point environment. Exception behavior of "strict" is still not
      allowed since we are not allowed to remove any traps in that case.
      
      There are no restrictions on CSE across function calls inside a function.
      
      Differential Revision: https://reviews.llvm.org/D112256
      05ac82de