aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/ValueTracking.cpp
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2020-01-18 12:21:14 +0100
committerNikita Popov <nikita.ppv@gmail.com>2020-01-22 22:49:32 +0100
commited80c86c8854647ad6246544e3865e416ecfc451 (patch)
tree5b6277abc9cf13afb4d2c25f7438fdcc6aa90f5e /llvm/lib/Analysis/ValueTracking.cpp
parent90f58eaeff5f1d5017e7b689fac79180cdfa0160 (diff)
downloadllvm-ed80c86c8854647ad6246544e3865e416ecfc451.zip
llvm-ed80c86c8854647ad6246544e3865e416ecfc451.tar.gz
llvm-ed80c86c8854647ad6246544e3865e416ecfc451.tar.bz2
[PatternMatch] Add m_APInt/m_APFloat matchers accepting undef
The current m_APInt() and m_APFloat() matchers do not accept splats that include undefs (unlike m_Zero() and other matchers for specific values). We can't simply change the default behavior, as there are existing transforms that would not be safe with undefs. For this reason, I'm introducing new m_APIntAllowUndef() and m_APFloatAllowUndef() matchers, that allow splats with undefs. Additionally, m_APIntForbidUndef() and m_APFloatForbidUndef() are added. These have the same behavior as the existing m_APInt() and m_APFloat(), but serve as an explicit indication that undefs were considered and found unsound for this transform. This helps distinguish them from existing uses of m_APInt() where we do not know whether undefs can or cannot be allowed without additional review. Differential Revision: https://reviews.llvm.org/D72975
Diffstat (limited to 'llvm/lib/Analysis/ValueTracking.cpp')
0 files changed, 0 insertions, 0 deletions