[InstCombine] Add regression test cases for bitreverse optimization; NFC
authorAustin Chang <austin880625@gmail.com>
Thu, 25 May 2023 17:10:31 +0000 (12:10 -0500)
committerNoah Goldstein <goldstein.w.n@gmail.com>
Thu, 25 May 2023 18:41:32 +0000 (13:41 -0500)
commit1d1f7eeee6bf38ef35083f676875950b4f5528f7
treec1d4c4713e108a2574973a9886f5489e8b6ae3aa
parent171dfc5462a23b7e8ace31f4d9206b972b38ffbc
[InstCombine] Add regression test cases for bitreverse optimization; NFC

Fold the following case on IR InstCombine pass. This patch includes the new test cases for this optimization

```
bitreverse(logic_op(x, bitreverse(y))) -> logic_op(bitreverse(x), y)
bitreverse(logic_op(bitreverse(x), y)) -> logic_op(x, bitreverse(y))
bitreverse(logic_op(bitreverse(x), bitreverse(y))) -> logic_op(x, y) with multi-use
```

Reviewed By: goldstein.w.n

Differential Revision: https://reviews.llvm.org/D151245
llvm/test/Transforms/InstCombine/bitreverse.ll