1. Nov 24, 2022
  2. Nov 23, 2022
    • Hassnaa Hamdi's avatar
      [AArch64][SME]: Generate streaming-compatible code for int-minmax, fp-minmax · 10eda33a
      Hassnaa Hamdi authored
      1-To generate code compatible to streaming mode:
       - enable custom lowering for SMIN, SMAX, UMIN, UMAX,
         FMAXNUM, FMINNUM, FMAXIMUM, FMINIMUM.
      2-Testing files:
       - int-minmax.ll
       - fp-minmax.ll
      
      Reviewed By: david-arm, sdesmalen
      
      Differential Revision: https://reviews.llvm.org/D138292
      10eda33a
    • Hassnaa Hamdi's avatar
      [AArch64][SME]: Add precursory tests for D138292 · a5ee6e08
      Hassnaa Hamdi authored
      Add testing files:
      - int-minmax.ll
      - fp-minmax.ll
      a5ee6e08
    • Louis Dionne's avatar
      [libc++][NFC] Fix documentation build · 09f75548
      Louis Dionne authored
      09f75548
    • Hans Wennborg's avatar
      Revert "Make -fsanitize=scudo use scudo_standalone. Delete check-scudo." · 907baeec
      Hans Wennborg authored
      It broke the build, see comments on code review.
      
      > Leaves the implementation and tests files in-place for right now, but
      > deletes the ability to build the old sanitizer-common based scudo. This
      > has been on life-support for a long time, and the newer scudo_standalone
      > is much better supported and maintained.
      >
      > Also patches up some GWP-ASan wording, primarily related to the fact
      > that -fsanitize=scudo now is scudo_standalone, and therefore the way to
      > reference the GWP-ASan options through the environment variable has
      > changed.
      >
      > Future follow-up patches will delete the original scudo, and migrate all
      > its tests over to be part of the scudo_standalone test suite.
      >
      > Reviewed By: vitalybuka
      >
      > Differential Revision: https://reviews.llvm.org/D138157
      
      This reverts commit ab1a5991.
      907baeec
    • Jonas Paulsson's avatar
      [SystemZ] Extend combineGET_CCMASK() to handle a truncated SELECT_CCMASK. · ca515294
      Jonas Paulsson authored
      In cases where the SELECT_CCMASK has an additional user of the carry, a
      truncated SELECT_CCMASK may result as the input to the GET_CCMASK, which need
      to be recognized.
      
      Fixes https://github.com/llvm/llvm-project/issues/59054
      
      Reviewed By: Ulrich Weigand
      
      Differential Revision: https://reviews.llvm.org/D138324
      ca515294
    • Balazs Benics's avatar
      [analyzer] getBinding should auto-detect type only if it was not given · 93b98eb3
      Balazs Benics authored
      Casting a pointer to a suitably large integral type by reinterpret-cast
      should result in the same value as by using the `__builtin_bit_cast()`.
      The compiler exploits this: https://godbolt.org/z/zMP3sG683
      
      However, the analyzer does not bind the same symbolic value to these
      expressions, resulting in weird situations, such as failing equality
      checks and even results in crashes: https://godbolt.org/z/oeMP7cj8q
      
      Previously, in the `RegionStoreManager::getBinding()` even if `T` was
      non-null, we replaced it with `TVR->getValueType()` in case the `MR` was
      `TypedValueRegion`.
      It doesn't make much sense to auto-detect the type if the type is
      already given. By not doing the auto-detection, we would just do the
      right thing and perform the load by that type.
      This means that we will cast the value to that type.
      
      So, in this patch, I'm proposing to do auto-detection only if the type
      was null.
      
      Here is a snippet of code, annotated by the previous and new dump values.
      `LocAsInteger` should wrap the `SymRegion`, since we want to load the
      address as if it was an integer.
      In none of the following cases should type auto-detection be triggered,
      hence we should eventually reach an `evalCast()` to lazily cast the loaded
      value into that type.
      
      ```lang=C++
      void LValueToRValueBitCast_dumps(void *p, char (*array)[8]) {
        clang_analyzer_dump(p);     // remained: &SymRegion{reg_$0<void * p>}
        clang_analyzer_dump(array); // remained: {{&SymRegion{reg_$1<char (*)[8] array>}
        clang_analyzer_dump((unsigned long)p);
        // remained: {{&SymRegion{reg_$0<void * p>} [as 64 bit integer]}}
        clang_analyzer_dump(__builtin_bit_cast(unsigned long, p));     <--------- change #1
        // previously: {{&SymRegion{reg_$0<void * p>}}}
        // now:        {{&SymRegion{reg_$0<void * p>} [as 64 bit integer]}}
        clang_analyzer_dump((unsigned long)array); // remained: {{&SymRegion{reg_$1<char (*)[8] array>} [as 64 bit integer]}}
        clang_analyzer_dump(__builtin_bit_cast(unsigned long, array)); <--------- change #2
        // previously: {{&SymRegion{reg_$1<char (*)[8] array>}}}
        // now:        {{&SymRegion{reg_$1<char (*)[8] array>} [as 64 bit integer]}}
      }
      ```
      
      Reviewed By: xazax.hun
      
      Differential Revision: https://reviews.llvm.org/D136603
      93b98eb3
    • Louis Dionne's avatar
      [libc++] Remove default definition of std::char_traits · aeecef08
      Louis Dionne authored
      This patch removes the base template implementation for std::char_traits.
      If my reading of http://eel.is/c++draft/char.traits is correct, the
      Standard mandates that the library provides specializations for several
      types like char and wchar_t, but not any implementation in the base
      template. Indeed, such an implementation is bound to be incorrect for
      most types anyways, since things like `eof()` and `int_type` will definitely
      have to be customized.
      
      Since the base template implementation should not have worked for anyone,
      this shouldn't be a breaking change (I expect that anyone defining a
      custom character type today will already have to provide their own
      specialization of char_traits). However, since we're aware of some users
      of char_traits for unsigned char and signed char, we're keeping those two
      specializations around for two releases to give people some time to migrate.
      
      Differential Revision: https://reviews.llvm.org/D138307
      aeecef08
    • Louis Dionne's avatar
      [libc++] Add missing __has_include checks for C headers not provided by libc++ · 647ddc08
      Louis Dionne authored
      This makes the library consistent in how it handles C library headers. For C headers provided by libc++,
      we unconditionally include <foo.h> from <cfoo>, and then <foo.h> conditionally include_next <foo.h>.
      For headers not provided by libc++, <cfoo> conditionally includes the system's <foo.h> directly.
      
      Differential Revision: https://reviews.llvm.org/D138512
      647ddc08
    • Nico Weber's avatar
      [lld/mac] Reorder an assert() and a printArchiveMemberLoad() call · 09b8b447
      Nico Weber authored
      No behavior difference in practice, but makes it possible to use `-t`
      for debugging when that assert fails.
      09b8b447
    • Michał Górny's avatar
      [flang] Fix unittests in standalone build for third-party move · 58d1988b
      Michał Górny authored
      Update external unittest rules for flang standalone builds to account
      for the unittest components (gtest, gmock) being moved to `third-party`
      directory, in a11cd0d9.
      
      Differential Revision: https://reviews.llvm.org/D138562
      58d1988b