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 10:32:27 +0200
commitb558ac0eef57a3737b1e27844115fa91e0b32582 (patch)
tree83027452345f76d4a0e0561ec74a0e1be6f00e41 /clang/lib/Frontend/InitPreprocessor.cpp
parentfdcfb277465e4530e5837fb8a95031794e58cb9b (diff)
downloadllvm-b558ac0eef57a3737b1e27844115fa91e0b32582.zip
llvm-b558ac0eef57a3737b1e27844115fa91e0b32582.tar.gz
llvm-b558ac0eef57a3737b1e27844115fa91e0b32582.tar.bz2
[InstCombine] Fix context for multi-use demanded bits simplification
When simplifying a multi-use root value, the demanded bits were reset to full, but we also need to reset the context extract. To make this convenient (without requiring by-value passing of SimplifyQuery), move the logic that 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