SuccessChanges

Summary

  1. gn build: Merge r372343
  2. [SVFS] Vector Function ABI demangling. This patch implements the demangling functionality as described in the Vector Function ABI. This patch will be used to implement the SearchVectorFunctionSystem (SVFS) as described in the RFC: http://lists.llvm.org/pipermail/llvm-dev/2019-June/133484.html A fuzzer is added to test the demangling utility. Patch by Sumedh Arani <sumedh.arani@arm.com> Differential revision: https://reviews.llvm.org/D66024
  3. The LLD buildbot has some tests that are not reliable. Hopefully reducing the number of threads for the test will fix the issue. It seems that the quotes around the parameters means it tries to take everything as one argument. Bu using -j we can actually pass everything as one argument by attaching the j to the sv. Patch by Stefan Pintilie.
  4. [InstCombine] Simplify @llvm.usub.with.overflow+non-zero check (PR43251) Summary: This is again motivated by D67122 sanitizer check enhancement. That patch seemingly worsens `-fsanitize=pointer-overflow` overhead from 25% to 50%, which strongly implies missing folds. In this particular case, given ``` char* test(char& base, unsigned long offset) { return &base - offset; } ``` it will end up producing something like https://godbolt.org/z/luGEju which after optimizations reduces down to roughly ``` declare void @use64(i64) define i1 @test(i8* dereferenceable(1) %base, i64 %offset) { %base_int = ptrtoint i8* %base to i64 %adjusted = sub i64 %base_int, %offset call void @use64(i64 %adjusted) %not_null = icmp ne i64 %adjusted, 0 %no_underflow = icmp ule i64 %adjusted, %base_int %no_underflow_and_not_null = and i1 %not_null, %no_underflow ret i1 %no_underflow_and_not_null } ``` Without D67122 there was no `%not_null`, and in this particular case we can "get rid of it", by merging two checks: Here we are checking: `Base u>= Offset && (Base u- Offset) != 0`, but that is simply `Base u> Offset` Alive proofs: https://rise4fun.com/Alive/QOs The `@llvm.usub.with.overflow` pattern itself is not handled here because this is the main pattern, that we currently consider canonical. https://bugs.llvm.org/show_bug.cgi?id=43251 Reviewers: spatel, nikic, xbolva00, majnemer Reviewed By: xbolva00, majnemer Subscribers: vsk, majnemer, xbolva00, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D67356
Revision 372344 by gnsyncbot:
gn build: Merge r372343
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/utils/gn/secondary/llvm/lib/Analysis/BUILD.gn (diff)llvm.src/utils/gn/secondary/llvm/lib/Analysis/BUILD.gn
The file was modified/llvm/trunk/utils/gn/secondary/llvm/unittests/Analysis/BUILD.gn (diff)llvm.src/utils/gn/secondary/llvm/unittests/Analysis/BUILD.gn
Revision 372343 by fpetrogalli:
[SVFS] Vector Function ABI demangling.

This patch implements the demangling functionality as described in the
Vector Function ABI. This patch will be used to implement the
SearchVectorFunctionSystem (SVFS) as described in the RFC:

http://lists.llvm.org/pipermail/llvm-dev/2019-June/133484.html

A fuzzer is added to test the demangling utility.

Patch by Sumedh Arani <sumedh.arani@arm.com>

Differential revision: https://reviews.llvm.org/D66024
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/Analysis/VectorUtils.h (diff)llvm.src/include/llvm/Analysis/VectorUtils.h
The file was modified/llvm/trunk/lib/Analysis/CMakeLists.txt (diff)llvm.src/lib/Analysis/CMakeLists.txt
The file was added/llvm/trunk/lib/Analysis/VFABIDemangling.cppllvm.src/lib/Analysis/VFABIDemangling.cpp
The file was added/llvm/trunk/tools/vfabi-demangle-fuzzerllvm.src/tools/vfabi-demangle-fuzzer
The file was added/llvm/trunk/tools/vfabi-demangle-fuzzer/CMakeLists.txtllvm.src/tools/vfabi-demangle-fuzzer/CMakeLists.txt
The file was added/llvm/trunk/tools/vfabi-demangle-fuzzer/vfabi-demangler-fuzzer.cppllvm.src/tools/vfabi-demangle-fuzzer/vfabi-demangler-fuzzer.cpp
The file was modified/llvm/trunk/unittests/Analysis/CMakeLists.txt (diff)llvm.src/unittests/Analysis/CMakeLists.txt
The file was added/llvm/trunk/unittests/Analysis/VectorFunctionABITest.cppllvm.src/unittests/Analysis/VectorFunctionABITest.cpp
Revision 372342 by gkistanova:
The LLD buildbot has some tests that are not reliable.
Hopefully reducing the number of threads for the test will fix the issue.
It seems that the quotes around the parameters means it tries to take everything as one argument. Bu using -j we can actually pass everything as one argument by attaching the j to the sv.

Patch by Stefan Pintilie.
Change TypePath in RepositoryPath in Workspace
The file was modified/zorg/trunk/buildbot/osuosl/master/config/builders.py (diff)zorg/buildbot/osuosl/master/config/builders.py
Revision 372341 by lebedevri:
[InstCombine] Simplify @llvm.usub.with.overflow+non-zero check (PR43251)

Summary:
This is again motivated by D67122 sanitizer check enhancement.
That patch seemingly worsens `-fsanitize=pointer-overflow`
overhead from 25% to 50%, which strongly implies missing folds.

In this particular case, given
```
char* test(char& base, unsigned long offset) {
  return &base - offset;
}
```
it will end up producing something like
https://godbolt.org/z/luGEju
which after optimizations reduces down to roughly
```
declare void @use64(i64)
define i1 @test(i8* dereferenceable(1) %base, i64 %offset) {
  %base_int = ptrtoint i8* %base to i64
  %adjusted = sub i64 %base_int, %offset
  call void @use64(i64 %adjusted)
  %not_null = icmp ne i64 %adjusted, 0
  %no_underflow = icmp ule i64 %adjusted, %base_int
  %no_underflow_and_not_null = and i1 %not_null, %no_underflow
  ret i1 %no_underflow_and_not_null
}
```
Without D67122 there was no `%not_null`,
and in this particular case we can "get rid of it", by merging two checks:
Here we are checking: `Base u>= Offset && (Base u- Offset) != 0`, but that is simply `Base u> Offset`

Alive proofs:
https://rise4fun.com/Alive/QOs

The `@llvm.usub.with.overflow` pattern itself is not handled here
because this is the main pattern, that we currently consider canonical.

https://bugs.llvm.org/show_bug.cgi?id=43251

Reviewers: spatel, nikic, xbolva00, majnemer

Reviewed By: xbolva00, majnemer

Subscribers: vsk, majnemer, xbolva00, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D67356
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp (diff)llvm.src/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
The file was modified/llvm/trunk/test/Transforms/InstCombine/result-of-usub-is-non-zero-and-no-overflow.ll (diff)llvm.src/test/Transforms/InstCombine/result-of-usub-is-non-zero-and-no-overflow.ll