[all-commits] [llvm/llvm-project] 1d1f7e: [InstCombine] Add regression test cases for bitrev...
Austin Chang via All-commits
all-commits at lists.llvm.org
Thu May 25 11:41:55 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 1d1f7eeee6bf38ef35083f676875950b4f5528f7
https://github.com/llvm/llvm-project/commit/1d1f7eeee6bf38ef35083f676875950b4f5528f7
Author: Austin Chang <austin880625 at gmail.com>
Date: 2023-05-25 (Thu, 25 May 2023)
Changed paths:
M llvm/test/Transforms/InstCombine/bitreverse.ll
Log Message:
-----------
[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
Commit: 68c5d46b6ec46c59afa052d2b2945ca7b22f58d6
https://github.com/llvm/llvm-project/commit/68c5d46b6ec46c59afa052d2b2945ca7b22f58d6
Author: Austin Chang <austin880625 at gmail.com>
Date: 2023-05-25 (Thu, 25 May 2023)
Changed paths:
M llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
M llvm/test/Transforms/InstCombine/bitreverse.ll
Log Message:
-----------
[InstCombine] Improve bitreverse optimization
This patch utilizes the helper function implemented in D149699 and thus folds the following cases:
```
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) in multiuse case
```
Reviewed By: goldstein.w.n, RKSimon
Differential Revision: https://reviews.llvm.org/D151246
Compare: https://github.com/llvm/llvm-project/compare/171dfc5462a2...68c5d46b6ec4
More information about the All-commits
mailing list