[InstCombine] avoid infinite loops with select folds of constant expressions
authorSanjay Patel <spatel@rotateright.com>
Sun, 20 Jun 2021 13:41:59 +0000 (09:41 -0400)
committerSanjay Patel <spatel@rotateright.com>
Sun, 20 Jun 2021 13:46:25 +0000 (09:46 -0400)
commit240acb0cff3f7a5b33e29ad7df2081dd9140d630
treefc361f64e490e3a89010aabd4bddc885108e2029
parente497b12a69604b6d691312a30f6b86da4f18f7f8
[InstCombine] avoid infinite loops with select folds of constant expressions

This pair of transforms was added recently with:
8591640379ac9175a

And could lead to conflicting folds:
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=35399
llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
llvm/test/Transforms/InstCombine/select-and-or.ll