aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/Support/ProgramTest.cpp
diff options
context:
space:
mode:
authorVolodymyr Vasylkun <vvmposeydon@gmail.com>2024-09-13 19:50:27 +0100
committerGitHub <noreply@github.com>2024-09-13 19:50:27 +0100
commit21e3a212c570dc80055742ef8abbd0a306ff9135 (patch)
tree9efe34605d01a3a54e0cc6a63edec85338409d31 /llvm/unittests/Support/ProgramTest.cpp
parent29e5fe78f168a2f67f36cf56ffeff810d7ffcee6 (diff)
downloadllvm-21e3a212c570dc80055742ef8abbd0a306ff9135.zip
llvm-21e3a212c570dc80055742ef8abbd0a306ff9135.tar.gz
llvm-21e3a212c570dc80055742ef8abbd0a306ff9135.tar.bz2
[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.
Diffstat (limited to 'llvm/unittests/Support/ProgramTest.cpp')
0 files changed, 0 insertions, 0 deletions