aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/InitPreprocessor.cpp
diff options
context:
space:
mode:
authorNikita Popov <npopov@redhat.com>2024-07-02 10:08:45 +0200
committerNikita Popov <npopov@redhat.com>2024-07-02 11:02:55 +0200
commit86b37944a70229b07626e63bdb9a46b4bc3d1460 (patch)
treea2f1a32261a652e03bd632d2f5ad2e91365e9d1f /clang/lib/Frontend/InitPreprocessor.cpp
parent167c860ba209fc584f72d04c48091b40ae3a5610 (diff)
downloadllvm-86b37944a70229b07626e63bdb9a46b4bc3d1460.zip
llvm-86b37944a70229b07626e63bdb9a46b4bc3d1460.tar.gz
llvm-86b37944a70229b07626e63bdb9a46b4bc3d1460.tar.bz2
Reapply [InstCombine] Fix context for multi-use demanded bits simplification
Repplied with a clang test fix. ----- When simplifying a multi-use root value, the demanded bits were reset to full, but we also need to reset the context instruction. To make this convenient (without requiring by-value passing of SimplifyQuery), move the logic that handles constants and dispatches to SimplifyDemandedUseBits/SimplifyMultipleUseDemandedBits into SimplifyDemandedBits. The SimplifyDemandedInstructionBits caller starts with full demanded bits and an appropriate context anyway. The different context instruction does mean that the ephemeral value protection no longer triggers in some cases, as the changes to assume tests show. An alternative, which I will explore in a followup, is to always use SimplifyMultipleUseDemandedBits() -- the previous root special case is only really intended for SimplifyDemandedInstructionBits(), which now no longer shares this code path. Fixes https://github.com/llvm/llvm-project/issues/97330.
Diffstat (limited to 'clang/lib/Frontend/InitPreprocessor.cpp')
0 files changed, 0 insertions, 0 deletions