Open XChy opened 6 months ago
@XChy: I think will be good idea if you'll request triage
role, so you'll be able label issues. Procedure is same as for commit access: https://llvm.org/docs/DeveloperPolicy.html#obtaining-commit-access.
@XChy: I think will be good idea if you'll request
triage
role, so you'll be able label issues. Procedure is same as for commit access: https://llvm.org/docs/DeveloperPolicy.html#obtaining-commit-access.
Oh, sorry for it.. I always forget to add label after opening an issue ):
A generalized proof for transforming fshl(a, a, c1) == c2
to a == fshr(c2, c2, c1)
(also reversely): https://alive2.llvm.org/ce/z/JudZWc
cc @dtcxzyw
I think it is easy to handle this optimization in InstCombinerImpl::visitSwitchInst
.
Hi!
This issue may be a good introductory issue for people new to working on LLVM. If you would like to work on this issue, your first steps are:
test/
create fine-grained testing targets, so you can e.g. use make check-clang-ast
to only run Clang's AST tests.git clang-format HEAD~1
to format your changes.If you have any further questions about this issue, don't hesitate to ask via a comment in the thread below.
@llvm/issue-subscribers-good-first-issue
Author: XChy (XChy)
Hello, I would like to take it, thanks.
FYI, SimplifyCFG
does the reverse transform :(
Alive2 proof: https://alive2.llvm.org/ce/z/uPJXhH
Motivating example
can be folded to:
Real-world motivation
This snippet of IR is derived from ruby/signal.c@sig_trap (after O3 pipeline). The example above is a reduced version. If you're interested in the original suboptimal IR and optimal IR, see also:https://godbolt.org/z/E7nz88vbP
Let me know if you can confirm that it's an optimization opportunity, thanks.