[all-commits] [llvm/llvm-project] 99d6e3: [NFC][SROA] Add C++'s `std::clamp()` testcase from...

Roman Lebedev via All-commits all-commits at lists.llvm.org
Fri Apr 9 14:56:59 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 99d6e31e0bd02d484c213a7446fd707c62dec45b
      https://github.com/llvm/llvm-project/commit/99d6e31e0bd02d484c213a7446fd707c62dec45b
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2021-04-10 (Sat, 10 Apr 2021)

  Changed paths:
    A llvm/test/Transforms/SROA/std-clamp.ll

  Log Message:
  -----------
  [NFC][SROA] Add C++'s `std::clamp()` testcase from PR47271/PR49909


  Commit: 077bff39d46364035a5dcfa32fc69910ad0975d0
      https://github.com/llvm/llvm-project/commit/077bff39d46364035a5dcfa32fc69910ad0975d0
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2021-04-10 (Sat, 10 Apr 2021)

  Changed paths:
    M llvm/lib/Analysis/Loads.cpp
    M llvm/test/Transforms/SROA/std-clamp.ll

  Log Message:
  -----------
  [Analysis] isDereferenceableAndAlignedPointer(): recurse into select's hands

By doing this within the method itself,
we support traversing multiple levels of selects (TODO: PHI's),
fixing the SROA `std::clamp()` testcase.

Fixes https://bugs.llvm.org/show_bug.cgi?id=47271
Mostly fixes https://bugs.llvm.org/show_bug.cgi?id=49909


Compare: https://github.com/llvm/llvm-project/compare/7df30e77d499...077bff39d463


More information about the All-commits mailing list