[llvm] [AArch64] Optimize CSEL with AL/NV condition code in peephole pass (PR #207742)
David Green via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 9 06:24:03 PDT 2026
davemgreen wrote:
> Thank you for the feedback. I investigated this and you're right that normal compilation doesn't seem to produce CSEL with AL/NV conditions -- the optimizer eliminates trivially true conditions before they reach the backend.
>
> I was unable to find a concrete example where this pattern appears in practice. Could you confirm whether this optimization is worth keeping if no practical case exists, or should I close this PR?
>
> I'm a new contributor learning LLVM internals and appreciate the guidance.
Hello. We would only want to carry the code if it has an impact in practice, and we should be aiming to optimize these types of conditions earlier in the pipeline. We usually start with something that is not yet optimal and work towards how we would generate the optimal sequence with changes in the compiler.
https://github.com/llvm/llvm-project/pull/207742
More information about the llvm-commits
mailing list