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