[llvm] [InstCombine] Replace an integer comparison of a `phi` node with multiple `ucmp`/`scmp` operands and a constant with `phi` of individual comparisons of original intrinsic's arguments (PR #107769)
Volodymyr Vasylkun via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 9 02:18:21 PDT 2024
================
----------------
Poseydon42 wrote:
The case you're proposing would still actually enable this optimization since we can still move the `icmp` into every incoming BB, and only one of the `scmp`s will not be removed due to it being used more than once (in this case the BB with `scmp` becomes what was previously `NonSimplifiedBB`). I think it's better to add a negative test where both `scmp`s are not one-use, since in that case the optimization wouldn't be trivially profitable.
https://github.com/llvm/llvm-project/pull/107769
More information about the llvm-commits
mailing list