SuccessChanges

Summary

  1. [Codegen][SelectionDAG] X u% C == 0 fold: non-splat vector improvements Summary: Four things here: 1. Generalize the fold to handle non-splat divisors. Reasonably trivial. 2. Unban power-of-two divisors. I don't see any reason why they should be illegal. * There is no ban in Hacker's Delight * I think the ban came from the same bug that caused the miscompile in the base patch - in `floor((2^W - 1) / D)` we were dividing by `D0` instead of `D`, and we **were** ensuring that `D0` is not `1`, which made sense. 3. Unban `1` divisors. I no longer believe Hacker's Delight actually says that the fold is invalid for `D = 0`. Further considerations: * We know that * `(X u% 1) == 0` can be constant-folded to `1`, * `(X u% 1) != 0` can be constant-folded to `0`, * Also, we know that * `X u<= -1` can be constant-folded to `1`, * `X u> -1` can be constant-folded to `0`, * https://godbolt.org/z/7jnZJX https://rise4fun.com/Alive/oF6p * We know will end up with the following: `(setule/setugt (rotr (mul N, P), K), Q)` * Therefore, for given new DAG nodes and comparison predicates (`ule`/`ugt`), we will still produce the correct answer if: `Q` is a all-ones constant; and both `P` and `K` are *anything* other than `undef`. * The fold will indeed produce `Q = all-ones`. 4. Try to re-splat the `P` and `K` vectors - we don't care about their values for the lanes where divisor was `1`. Reviewers: RKSimon, hermord, craig.topper, spatel, xbolva00 Reviewed By: RKSimon Subscribers: hiraditya, javed.absar, dexonsmith, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D63963
  2. [X86][SSE] Use PSADBW to improve vXi8 sum reduction (PR42674) As detailed on PR42674, we can reduce a vXi8 down until we have the final <8 x i8>, and then use PSADBW with zero, to sum those values. We then extract the bottom i8, discarding any overflow from the upper bits of the i16 result.
  3. Fix cppcheck reduce scope variable warnings. NFCI Move a couple of variables inside the block where they are actually needed.
  4. Revert "Fix asan infinite loop on undefined symbol" This reverts commit cbd28cd05bb11e9d76d71c6cc2d38d89dbb1fe1a. Buildbot fail: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/22434/steps/64-bit%20check-asan-dynamic/
  5. [Local] Zap blockaddress without users in ConstantFoldTerminator. If the blockaddress is not destoryed, the destination block will still be marked as having its address taken, limiting further transformations. I think there are other places where the dead blockaddress constants are kept around, I'll look into that as follow up. Reviewers: craig.topper, brzycki, davide Reviewed By: brzycki, davide Differential Revision: https://reviews.llvm.org/D64936
  6. Fix asan infinite loop on undefined symbol Fix llvm#39641 Recommit of r366413 Differential Revision: https://reviews.llvm.org/D63877
  7. [c++20] P1161R3: a[b,c] is deprecated.
  8. Mark P1301R4 in C++2a as being SVN instead.
  9. We support P1301R4 in C++2a as of r366626.
  10. [cxx_status] Update status page for WG21 Cologne meeting motions. Note that many of the paper links will be dead until the post-meeting mailing is released.
  11. Implement P1301R4, which allows specifying an optional message on the [[nodiscard]] attribute. This also bumps the attribute feature test value and introduces the notion of a C++2a extension warning.
Revision 366637 by lebedevri:
[Codegen][SelectionDAG] X u% C == 0 fold: non-splat vector improvements

Summary:
Four things here:
1. Generalize the fold to handle non-splat divisors. Reasonably trivial.
2. Unban power-of-two divisors. I don't see any reason why they should
   be illegal.
   * There is no ban in Hacker's Delight
   * I think the ban came from the same bug that caused the miscompile
      in the base patch - in `floor((2^W - 1) / D)` we were dividing by
      `D0` instead of `D`, and we **were** ensuring that `D0` is not `1`,
      which made sense.
3. Unban `1` divisors. I no longer believe Hacker's Delight actually says
   that the fold is invalid for `D = 0`. Further considerations:
   * We know that
     * `(X u% 1) == 0`  can be constant-folded to `1`,
     * `(X u% 1) != 0`  can be constant-folded to `0`,
   *  Also, we know that
     * `X u<= -1` can be constant-folded to `1`,
     * `X u>  -1` can be constant-folded to `0`,
   * https://godbolt.org/z/7jnZJX https://rise4fun.com/Alive/oF6p
   * We know will end up with the following:
       `(setule/setugt (rotr (mul N, P), K), Q)`
   * Therefore, for given new DAG nodes and comparison predicates
     (`ule`/`ugt`), we will still produce the correct answer if:
     `Q` is a all-ones constant; and both `P` and `K` are *anything*
     other than `undef`.
   * The fold will indeed produce `Q = all-ones`.
4. Try to re-splat the `P` and `K` vectors - we don't care about
   their values for the lanes where divisor was `1`.

Reviewers: RKSimon, hermord, craig.topper, spatel, xbolva00

Reviewed By: RKSimon

Subscribers: hiraditya, javed.absar, dexonsmith, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D63963
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp (diff)llvm.src/lib/CodeGen/SelectionDAG/TargetLowering.cpp
The file was modified/llvm/trunk/test/CodeGen/AArch64/urem-seteq-vec-nonsplat.ll (diff)llvm.src/test/CodeGen/AArch64/urem-seteq-vec-nonsplat.ll
The file was modified/llvm/trunk/test/CodeGen/X86/urem-seteq-vec-nonsplat.ll (diff)llvm.src/test/CodeGen/X86/urem-seteq-vec-nonsplat.ll
Revision 366636 by rksimon:
[X86][SSE] Use PSADBW to improve vXi8 sum reduction (PR42674)

As detailed on PR42674, we can reduce a vXi8 down until we have the final <8 x i8>, and then use PSADBW with zero, to sum those values. We then extract the bottom i8, discarding any overflow from the upper bits of the i16 result.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (diff)llvm.src/lib/Target/X86/X86ISelLowering.cpp
The file was modified/llvm/trunk/test/CodeGen/X86/vector-reduce-add-widen.ll (diff)llvm.src/test/CodeGen/X86/vector-reduce-add-widen.ll
The file was modified/llvm/trunk/test/CodeGen/X86/vector-reduce-add.ll (diff)llvm.src/test/CodeGen/X86/vector-reduce-add.ll
Revision 366635 by rksimon:
Fix cppcheck reduce scope variable warnings. NFCI

Move a couple of variables inside the block where they are actually needed.
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/lib/Sema/SemaDecl.cpp (diff)clang.src/lib/Sema/SemaDecl.cpp
Revision 366634 by serge_sans_paille:
Revert "Fix asan infinite loop on undefined symbol"

This reverts commit cbd28cd05bb11e9d76d71c6cc2d38d89dbb1fe1a.

Buildbot fail: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/22434/steps/64-bit%20check-asan-dynamic/
Change TypePath in RepositoryPath in Workspace
The file was modified/compiler-rt/trunk/lib/interception/interception_linux.cc (diff)compiler-rt.src/lib/interception/interception_linux.cc
The file was removed/compiler-rt/trunk/test/asan/TestCases/Linux/dlopen-mixed-c-cxx.ccompiler-rt.src/test/asan/TestCases/Linux/dlopen-mixed-c-cxx.c
Revision 366633 by fhahn:
[Local] Zap blockaddress without users in ConstantFoldTerminator.

If the blockaddress is not destoryed, the destination block will still
be marked as having its address taken, limiting further transformations.

I think there are other places where the dead blockaddress constants are kept
around, I'll look into that as follow up.

Reviewers: craig.topper, brzycki, davide

Reviewed By: brzycki, davide

Differential Revision: https://reviews.llvm.org/D64936
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Transforms/Utils/Local.cpp (diff)llvm.src/lib/Transforms/Utils/Local.cpp
The file was modified/llvm/trunk/test/Transforms/SimplifyCFG/dce-cond-after-folding-terminator.ll (diff)llvm.src/test/Transforms/SimplifyCFG/dce-cond-after-folding-terminator.ll
Revision 366632 by serge_sans_paille:
Fix asan infinite loop on undefined symbol

Fix llvm#39641

Recommit of r366413

Differential Revision: https://reviews.llvm.org/D63877
Change TypePath in RepositoryPath in Workspace
The file was modified/compiler-rt/trunk/lib/interception/interception_linux.cc (diff)compiler-rt.src/lib/interception/interception_linux.cc
The file was added/compiler-rt/trunk/test/asan/TestCases/Linux/dlopen-mixed-c-cxx.ccompiler-rt.src/test/asan/TestCases/Linux/dlopen-mixed-c-cxx.c
Revision 366630 by rsmith:
[c++20] P1161R3: a[b,c] is deprecated.
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/include/clang/Basic/DiagnosticGroups.td (diff)clang.src/include/clang/Basic/DiagnosticGroups.td
The file was modified/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (diff)clang.src/include/clang/Basic/DiagnosticSemaKinds.td
The file was modified/cfe/trunk/lib/Sema/SemaExpr.cpp (diff)clang.src/lib/Sema/SemaExpr.cpp
The file was modified/cfe/trunk/test/SemaCXX/deprecated.cpp (diff)clang.src/test/SemaCXX/deprecated.cpp
The file was modified/cfe/trunk/www/cxx_status.html (diff)clang.src/www/cxx_status.html
Revision 366629 by aaronballman:
Mark P1301R4 in C++2a as being SVN instead.
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/www/cxx_status.html (diff)clang.src/www/cxx_status.html
Revision 366628 by aaronballman:
We support P1301R4 in C++2a as of r366626.
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/www/cxx_status.html (diff)clang.src/www/cxx_status.html
Revision 366627 by rsmith:
[cxx_status] Update status page for WG21 Cologne meeting motions.

Note that many of the paper links will be dead until the post-meeting
mailing is released.
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/www/cxx_status.html (diff)clang.src/www/cxx_status.html
Revision 366626 by aaronballman:
Implement P1301R4, which allows specifying an optional message on the [[nodiscard]] attribute.

This also bumps the attribute feature test value and introduces the notion of a C++2a extension warning.
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/include/clang/Basic/Attr.td (diff)clang.src/include/clang/Basic/Attr.td
The file was modified/cfe/trunk/include/clang/Basic/AttrDocs.td (diff)clang.src/include/clang/Basic/AttrDocs.td
The file was modified/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (diff)clang.src/include/clang/Basic/DiagnosticSemaKinds.td
The file was modified/cfe/trunk/lib/Sema/SemaDeclAttr.cpp (diff)clang.src/lib/Sema/SemaDeclAttr.cpp
The file was modified/cfe/trunk/lib/Sema/SemaStmt.cpp (diff)clang.src/lib/Sema/SemaStmt.cpp
The file was modified/cfe/trunk/test/CXX/dcl.dcl/dcl.attr/dcl.attr.nodiscard/p1.cpp (diff)clang.src/test/CXX/dcl.dcl/dcl.attr/dcl.attr.nodiscard/p1.cpp
The file was modified/cfe/trunk/test/CXX/dcl.dcl/dcl.attr/dcl.attr.nodiscard/p2.cpp (diff)clang.src/test/CXX/dcl.dcl/dcl.attr/dcl.attr.nodiscard/p2.cpp
The file was modified/cfe/trunk/test/Preprocessor/has_attribute.cpp (diff)clang.src/test/Preprocessor/has_attribute.cpp
The file was modified/cfe/trunk/test/Sema/c2x-nodiscard.c (diff)clang.src/test/Sema/c2x-nodiscard.c
The file was modified/cfe/trunk/test/SemaCXX/cxx11-attr-print.cpp (diff)clang.src/test/SemaCXX/cxx11-attr-print.cpp