aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Sema/SemaModule.cpp
diff options
context:
space:
mode:
authorNikita Popov <npopov@redhat.com>2024-04-19 09:10:33 +0900
committerGitHub <noreply@github.com>2024-04-19 09:10:33 +0900
commit396cdabe47f3596464b289d0937c0066f50a0ac6 (patch)
tree254871e539b38e88658c12f90221ac7651c5444a /clang/lib/Sema/SemaModule.cpp
parent949e66baf1c5d97dc60a243d9b66df5216255343 (diff)
downloadllvm-396cdabe47f3596464b289d0937c0066f50a0ac6.zip
llvm-396cdabe47f3596464b289d0937c0066f50a0ac6.tar.gz
llvm-396cdabe47f3596464b289d0937c0066f50a0ac6.tar.bz2
[PatternMatch] Allow poison in api_pred_ty matchers (#89188)
This allows vector splats containing poison for matchers using api_pred_ty, making the behavior consistent with cst_pred_ty. In other words, previously `m_NonNegative()` allowed splats with poison, while `m_NonNegative(C)` did not. Now both allow them. The affected matchers are m_MaxSignedValue, m_Negative, m_NonNegative, m_StrictlyPositive, m_NonPositive, m_Power2, m_Power2OrZero, m_NegatedPower2, m_NegatedPower2OrZero, m_LowBitMask and m_LowBitMaskOrZero when passing in APInt. I briefly went through the uses of these matchers and didn't spot any places where allowing poison would be obviously wrong (I initially thought foldSelectICmpAndBinOp is problematic, but because it does not reuse the original constants, it's fine). A problem here is that, despite these matchers appearing in a decent number of places, we have very little pre-existing test coverage for these folds with poison vectors, so we don't benefit from alive2 verification.
Diffstat (limited to 'clang/lib/Sema/SemaModule.cpp')
0 files changed, 0 insertions, 0 deletions