[llvm-branch-commits] [llvm] [LoongArch] Fold selects sharing operands with binary operations (PR #215520)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Aug 27 06:27:42 PDT 2026
heiher wrote:
> `select-binop-combine.ll` already performs a similar transformation at the IR level. After running `opt -O2`, the resulting code has the same effect as this combine. Do we still need to handle this separately in the backend?
Thanks! I checked the assembly generated by `clang -O3` when building the llvm-test-suite, and the expected codegen improvement is present with this patch. So I think this backend combine complements the existing IR-level optimization?
https://gitlab.com/la-rs/llvm-opt-ci/-/commit/1f2459e50ac1922777319b3b6b645cc55dd40e9f?view=parallel
https://github.com/llvm/llvm-project/pull/215520
More information about the llvm-branch-commits
mailing list