diff options
author | Nikita Popov <npopov@redhat.com> | 2024-07-02 10:38:28 +0200 |
---|---|---|
committer | Nikita Popov <npopov@redhat.com> | 2024-07-02 11:14:36 +0200 |
commit | 05670b42f5b45710bfdba48dcb7e8c30c8c7478f (patch) | |
tree | e5f9e7fd644fc740c2619b5ba73899be49e7852d /clang/lib/Frontend/InitPreprocessor.cpp | |
parent | 86b37944a70229b07626e63bdb9a46b4bc3d1460 (diff) | |
download | llvm-05670b42f5b45710bfdba48dcb7e8c30c8c7478f.zip llvm-05670b42f5b45710bfdba48dcb7e8c30c8c7478f.tar.gz llvm-05670b42f5b45710bfdba48dcb7e8c30c8c7478f.tar.bz2 |
[InstCombine] Remove root special case in demanded bits simplification
When calling SimplifyDemandedBits (as opposed to
SimplifyDemandedInstructionBits), and there are multiple uses,
always use SimplifyMultipleUseDemandedBits and drop the special
case for root values.
This fixes the ephemeral value detection, as seen by the restored
assumes in tests. It may result in more or less simplification,
depending on whether we get more out of having demanded bits or
the ability to perform non-multi-use transforms. The change in
the phi-known-bits.ll test is because the icmp operand now gets
simplified based on demanded bits, which then prevents a different
known bits simplification later.
This also makes the code safe against future changes like
https://github.com/llvm/llvm-project/pull/97289, which add more
context that would have to be discarded for the multi-use case.
Diffstat (limited to 'clang/lib/Frontend/InitPreprocessor.cpp')
0 files changed, 0 insertions, 0 deletions