[PATCH] D70169: [ConstantFold] Handle identity folds at top of ConstantFoldBinaryInst
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 13 03:02:07 PST 2019
fhahn created this revision.
fhahn added reviewers: spatel, RKSimon, lebedev.ri.
Herald added a subscriber: hiraditya.
Herald added a project: LLVM.
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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D70169
Files:
llvm/lib/IR/ConstantFold.cpp
llvm/test/Transforms/InstCombine/binop-identity-undef.ll
llvm/test/Transforms/InstCombine/vec_shuffle.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70169.229051.patch
Type: text/x-patch
Size: 4443 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191113/0ee1ba71/attachment.bin>
More information about the llvm-commits
mailing list