[InstCombine] Explicitly fold `~(~X >>u Y)` into `X >>s Y` (#75473)
commit9cf3e31172b7b9966ce95d6a84ca09f8d0f6ebc1
authorYingwei Zheng <dtcxzyw2333@gmail.com>
Thu, 14 Dec 2023 15:06:38 +0000 (14 23:06 +0800)
committerGitHub <noreply@github.com>
Thu, 14 Dec 2023 15:06:38 +0000 (14 23:06 +0800)
tree3e0f51cbf542249f372034b1a3068d5a104c4f2e
parentfd6e19cdc399fbda5a63a07ba4d5a0f6bc4b12f5
[InstCombine] Explicitly fold `~(~X >>u Y)` into `X >>s Y` (#75473)

Fixes #75369.

This patch explicitly folds `~(~X >>u Y)` into `X >>s Y` to fix assertion failure in #75369.
llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
llvm/test/Transforms/InstCombine/pr75369.ll [new file with mode: 0644]