[InstCombine] bitrev (zext i1 X) --> select X, SMinC, 0
authorSanjay Patel <spatel@rotateright.com>
Mon, 9 Jan 2023 17:25:02 +0000 (12:25 -0500)
committerSanjay Patel <spatel@rotateright.com>
Mon, 9 Jan 2023 17:27:37 +0000 (12:27 -0500)
commit0eedc9e56712938ce4c01e14ba755dbdb2a0df18
tree74cbb1656ba0b61109316765baa63237b33f6bb4
parentb1e69476189385e7a9d6207aa355de326cde4a13
[InstCombine] bitrev (zext i1 X) --> select X, SMinC, 0

https://alive2.llvm.org/ce/z/ZXCtgi

This breaks the infinite combine loop for issue #59897,
but we may still need more changes to avoid those loops.
llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
llvm/test/Transforms/InstCombine/bitreverse.ll