SuccessChanges

Summary

  1. [NFC][InstSimplify] Some tests for dropping null check after (details)
  2. [InstCombine] fold extract+insert into identity shuffle (details)
Commit 64965430db5706a0b235d52663f1fa466b53eed8 by lebedev.ri
[NFC][InstSimplify] Some tests for dropping null check after
uadd.with.overflow of non-null (PR43246)
https://rise4fun.com/Alive/WRzq
Name: C <= Y && Y != 0  -->  C <= Y  iff C != 0 Pre: C != 0
%y_is_nonnull = icmp ne i64 %y, 0
%no_overflow = icmp ule i64 C, %y
%r = and i1 %y_is_nonnull, %no_overflow
=>
%r = %no_overflow
Name: C <= Y || Y != 0  -->  Y != 0  iff C != 0 Pre: C != 0
%y_is_nonnull = icmp ne i64 %y, 0
%no_overflow = icmp ule i64 C, %y
%r = or i1 %y_is_nonnull, %no_overflow
=>
%r = %y_is_nonnull
Name: C > Y || Y == 0  -->  C > Y  iff C != 0 Pre: C != 0
%y_is_null = icmp eq i64 %y, 0
%overflow = icmp ugt i64 C, %y
%r = or i1 %y_is_null, %overflow
=>
%r = %overflow
Name: C > Y && Y == 0  -->  Y == 0  iff C != 0 Pre: C != 0
%y_is_null = icmp eq i64 %y, 0
%overflow = icmp ugt i64 C, %y
%r = and i1 %y_is_null, %overflow
=>
%r = %y_is_null
https://bugs.llvm.org/show_bug.cgi?id=43246
llvm-svn: 371339
The file was addedllvm/test/Transforms/InstSimplify/redundant-null-check-in-uadd_with_overflow-of-nonnull-ptr.ll
Commit aff5bee35fb36897dd5414a52c11c14d2f858822 by spatel
[InstCombine] fold extract+insert into identity shuffle
This is similar to the existing fold for splats added with: rL365379
If we can adjust the shuffle mask to include another element in an
identity mask (if it changes vector length, that's an extract/insert
subvector operation in the backend), then that can eliminate
extractelement/insertelement pairs in IR.
All targets are expected to lower shuffles with identity masks
efficiently.
llvm-svn: 371340
The file was modifiedllvm/test/Transforms/InstCombine/insert-extract-shuffle.ll
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp