diff options
author | Sanjay Patel <spatel@rotateright.com> | 2018-03-25 21:16:33 +0000 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2018-03-25 21:16:33 +0000 |
commit | 93e64dd9a1e2ed5e31881994cdde5e6ef94ddc79 (patch) | |
tree | 5867bafd5f56667416d68c5575768f8f61f58c67 /llvm/lib/Analysis/ValueTracking.cpp | |
parent | 68a8fbc1021cd612bb69bb6d50bcb9763ad00f00 (diff) | |
download | llvm-93e64dd9a1e2ed5e31881994cdde5e6ef94ddc79.zip llvm-93e64dd9a1e2ed5e31881994cdde5e6ef94ddc79.tar.gz llvm-93e64dd9a1e2ed5e31881994cdde5e6ef94ddc79.tar.bz2 |
[PatternMatch] allow undef elements when matching vector FP +0.0
This continues the FP constant pattern matching improvements from:
https://reviews.llvm.org/rL327627
https://reviews.llvm.org/rL327339
https://reviews.llvm.org/rL327307
Several integer constant matchers also have this ability. I'm
separating matching of integer/pointer null from FP positive zero
and renaming/commenting to make the functionality clearer.
llvm-svn: 328461
Diffstat (limited to 'llvm/lib/Analysis/ValueTracking.cpp')
-rw-r--r-- | llvm/lib/Analysis/ValueTracking.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp index 2ec9cc1..1a41d0c 100644 --- a/llvm/lib/Analysis/ValueTracking.cpp +++ b/llvm/lib/Analysis/ValueTracking.cpp @@ -2687,7 +2687,7 @@ bool llvm::CannotBeNegativeZero(const Value *V, const TargetLibraryInfo *TLI, return true; // (fadd x, 0.0) is guaranteed to return +0.0, not -0.0. - if (match(Op, m_FAdd(m_Value(), m_Zero()))) + if (match(Op, m_FAdd(m_Value(), m_PosZeroFP()))) return true; // sitofp and uitofp turn into +0.0 for zero. |