SuccessChanges

Summary

  1. [SCCP] Propagate inequalities (details)
  2. [llvm-symbolizer] Add compatibility aliases for --inlining={true,false} (details)
  3. [InstSimplify] Add tests for icmp with urem divisor (NFC) (details)
  4. [InstSimplify] Peephole optimization for icmp (urem X, Y), X (details)
  5. [NFC][LV] Vectorized Loop Skeleton Refactoring (details)
Commit 456497450482153afe86838ac2e2be395206d377 by nikita.ppv
[SCCP] Propagate inequalities

Teach SCCP to create notconstant lattice values from inequality
assumes and nonnull metadata, and update getConstant() to make
use of them. Additionally isOverdefined() needs to be changed to
consider notconstant an overdefined value.

Handling inequality branches is delayed until our branch on undef
story in other passes has been improved.

Differential Revision: https://reviews.llvm.org/D83643
The file was modifiedllvm/include/llvm/Analysis/ValueLattice.h
The file was modifiedllvm/test/Transforms/SCCP/assume.ll
The file was modifiedllvm/lib/Transforms/Scalar/SCCP.cpp
The file was modifiedllvm/test/Transforms/SCCP/metadata.ll
Commit 12cb400fd25863154c6d4d26427642cac0e52da1 by i
[llvm-symbolizer] Add compatibility aliases for --inlining={true,false}

D83530 removed --inlining={true,false} which were used by old asan_symbolize.py script.
Add compatibility aliases so that old asan_symbolize.py and sanitizer
binaries can work with new llvm-symbolizer.

Reviewed By: thakis

Differential Revision: https://reviews.llvm.org/D85228
The file was modifiedllvm/test/tools/llvm-symbolizer/output-style-inlined.test
The file was modifiedllvm/tools/llvm-symbolizer/Opts.td
The file was modifiedllvm/test/tools/llvm-symbolizer/sym.test
Commit b778b04b69d02a2fa18b22a1858f3eb26c2f7f24 by nikita.ppv
[InstSimplify] Add tests for icmp with urem divisor (NFC)
The file was modifiedllvm/test/Transforms/InstSimplify/compare.ll
Commit 29fe3fe6155fd79ce731a119ce8065a8a0d26b56 by nikita.ppv
[InstSimplify] Peephole optimization for icmp (urem X, Y), X

This revision adds the following peephole optimization
and it's negation:

    %a = urem i64 %x, %y
    %b = icmp ule i64 %a, %x
    ====>
    %b = true

With John Regehr's help this optimization was checked with Alive2
which suggests it should be valid.

This pattern occurs in the bound checks of Rust code, the program

    const N: usize = 3;
    const T = u8;

    pub fn split_mutiple(slice: &[T]) -> (&[T], &[T]) {
        let len = slice.len() / N;
        slice.split_at(len * N)
    }

the method call slice.split_at will check that len * N is within
the bounds of slice, this bounds check is after some transformations
turned into the urem seen above and then LLVM fails to optimize it
any further. Adding this optimization would cause this bounds check
to be fully optimized away.

ref: https://github.com/rust-lang/rust/issues/74938

Differential Revision: https://reviews.llvm.org/D85092
The file was modifiedllvm/lib/Analysis/InstructionSimplify.cpp
The file was modifiedllvm/test/Transforms/InstSimplify/compare.ll
Commit 3c0f34700230fc4fd23ef408adb75387dcfeff41 by bmahjour
[NFC][LV] Vectorized Loop Skeleton Refactoring

This patch tries to improve readability and maintenance
of createVectorizedLoopSkeleton by reorganizing some lines,
updating some of the comments and breaking it up into
smaller logical units.

Reviewed By: pjeeva01

Differential Revision: https://reviews.llvm.org/D83824
The file was modifiedllvm/lib/Transforms/Vectorize/LoopVectorize.cpp