[all-commits] [llvm/llvm-project] 21e3a2: [InstCombine] Replace an integer comparison of a `...
Volodymyr Vasylkun via All-commits
all-commits at lists.llvm.org
Fri Sep 13 11:50:50 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 21e3a212c570dc80055742ef8abbd0a306ff9135
https://github.com/llvm/llvm-project/commit/21e3a212c570dc80055742ef8abbd0a306ff9135
Author: Volodymyr Vasylkun <vvmposeydon at gmail.com>
Date: 2024-09-13 (Fri, 13 Sep 2024)
Changed paths:
M llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
A llvm/test/Transforms/InstCombine/phi-with-multiple-unsimplifiable-values.ll
Log Message:
-----------
[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 (#107769)
When we have a `phi` instruction with more than one of its incoming
values being a call to `ucmp` or `scmp`, which is then compared with an
integer constant, we can move the comparison through the `phi` into the
incoming basic blocks because we know that a comparison of `ucmp`/`scmp`
with a constant will be simplified by the next iteration of InstCombine.
There's a high chance that other similar patterns can be identified, in
which case they can be easily handled by the same code by moving the
check for "simplifiable" instructions into a lambda.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list