SuccessChanges

Summary

  1. [X86][SSE] Fold EXTEND_VECTOR_INREG(EXTEND_VECTOR_INREG(X)) -> EXTEND_VECTOR_INREG(X) (details)
  2. [Diagnostics] Fixed -Wsizeof-array-div false positive when divisor is sizeof reference type (PR47495) (details)
  3. [InstCombine] replace zombie unreachable values with 'undef' before erasing (details)
  4. [InstCombine] factorize left shifts of add/sub (details)
Commit 15c8306056beefa61533a895e8d836db72fccd14 by llvm-dev
[X86][SSE] Fold EXTEND_VECTOR_INREG(EXTEND_VECTOR_INREG(X)) -> EXTEND_VECTOR_INREG(X)

It should be possible to make this generic, but we're not great at checking legality of *_EXTEND_VECTOR_INREG ops so I'm conservatively putting this inside X86ISelLowering.cpp
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
The file was modifiedllvm/test/CodeGen/X86/masked_load.ll
Commit 2ae182258c49724e4daaae196de829ea65c116e8 by Dávid Bolvanský
[Diagnostics] Fixed -Wsizeof-array-div false positive when divisor is sizeof reference type (PR47495)
The file was modifiedclang/lib/Sema/SemaExpr.cpp
The file was modifiedclang/test/Sema/div-sizeof-array.cpp
Commit cf75e83275d16f9172fa5ab448a981afdadd34d0 by spatel
[InstCombine] replace zombie unreachable values with 'undef' before erasing

The test (currently crashing) is reduced from the example provided
in the post-commit discussion in D87149.

Differential Revision: https://reviews.llvm.org/D87965
The file was modifiedllvm/lib/Transforms/InstCombine/InstructionCombining.cpp
The file was modifiedllvm/test/Transforms/InstCombine/phi.ll
Commit 7903ae4720a8c4f3c694954d56293c7507e07945 by spatel
[InstCombine] factorize left shifts of add/sub

We do similar factorization folds in SimplifyUsingDistributiveLaws,
but that drops no-wrap properties. Propagating those optimally may
help solve:
https://llvm.org/PR47430

The propagation is all-or-nothing for these patterns: when all
3 incoming ops have nsw or nuw, the 2 new ops should have the
same no-wrap property:
https://alive2.llvm.org/ce/z/Dv8wsU

This also solves:
https://llvm.org/PR47584
The file was modifiedllvm/test/Transforms/InstCombine/shl-factor.ll
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp