SuccessChanges

Summary

  1. [ConstantFold] Add some tests for binops with constants and undefs. (details)
  2. [ConstantFold] Handle identity folds at top of ConstantFoldBinaryInst (details)
Commit 28c183859ae0e92b638721a738019fe7265910a5 by flo
[ConstantFold] Add some tests for binops with constants and undefs.
Precommit tests for D70169.
The file was addedllvm/test/Analysis/ConstantFolding/binop-identity-undef.ll
Commit 8eeabbaf5da31f44b42f0ef7d625640570b0a620 by flo
[ConstantFold] Handle identity folds at top of ConstantFoldBinaryInst
Currently we miss folds with undef and identity values for binary ops
that do not fold to undef in general.
We can generalize the identity simplifications and do them before
checking for undef in particular.
Alive checks:
* OR - https://rise4fun.com/Alive/8OsK
* AND - https://rise4fun.com/Alive/e3tE
This will also allow us to remove some now redundant cases throughout
the function, but I would like to do this as follow-up. That should make
tracking down potential issues easier.
Reviewers: spatel, RKSimon, lebedev.ri
Reviewed By: spatel
Differential Revision: https://reviews.llvm.org/D70169
The file was modifiedllvm/test/Transforms/InstCombine/vec_shuffle.ll
The file was modifiedllvm/test/Analysis/ConstantFolding/binop-identity-undef.ll
The file was modifiedllvm/lib/IR/ConstantFold.cpp