summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2018-08-07 14:36:27 +0000
committerSanjay Patel <spatel@rotateright.com>2018-08-07 14:36:27 +0000
commit948ff87d7de80ba0e959c322f19aa928c4ae7ad4 (patch)
tree29bd3710c8bdb0e242c201412a78ce7eabf487d3 /llvm/lib/Transforms
parente03993e6c73d8992f7d9c435ccd25a69f259316f (diff)
downloadbcm5719-llvm-948ff87d7de80ba0e959c322f19aa928c4ae7ad4.tar.gz
bcm5719-llvm-948ff87d7de80ba0e959c322f19aa928c4ae7ad4.zip
[InstSimplify] move minnum/maxnum with common op fold from instcombine
llvm-svn: 339144
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp30
1 files changed, 0 insertions, 30 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
index 748cb97d9b5..dcd080e3305 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
@@ -1143,23 +1143,7 @@ static Value *simplifyMinnumMaxnum(const IntrinsicInst &II) {
if (C1 && C1->isNaN())
return Arg0;
- Value *X = nullptr;
- Value *Y = nullptr;
if (II.getIntrinsicID() == Intrinsic::minnum) {
- // fmin(x, fmin(x, y)) -> fmin(x, y)
- // fmin(y, fmin(x, y)) -> fmin(x, y)
- if (match(Arg1, m_FMin(m_Value(X), m_Value(Y)))) {
- if (Arg0 == X || Arg0 == Y)
- return Arg1;
- }
-
- // fmin(fmin(x, y), x) -> fmin(x, y)
- // fmin(fmin(x, y), y) -> fmin(x, y)
- if (match(Arg0, m_FMin(m_Value(X), m_Value(Y)))) {
- if (Arg1 == X || Arg1 == Y)
- return Arg0;
- }
-
// TODO: fmin(nnan x, inf) -> x
// TODO: fmin(nnan ninf x, flt_max) -> x
if (C1 && C1->isInfinity()) {
@@ -1169,20 +1153,6 @@ static Value *simplifyMinnumMaxnum(const IntrinsicInst &II) {
}
} else {
assert(II.getIntrinsicID() == Intrinsic::maxnum);
- // fmax(x, fmax(x, y)) -> fmax(x, y)
- // fmax(y, fmax(x, y)) -> fmax(x, y)
- if (match(Arg1, m_FMax(m_Value(X), m_Value(Y)))) {
- if (Arg0 == X || Arg0 == Y)
- return Arg1;
- }
-
- // fmax(fmax(x, y), x) -> fmax(x, y)
- // fmax(fmax(x, y), y) -> fmax(x, y)
- if (match(Arg0, m_FMax(m_Value(X), m_Value(Y)))) {
- if (Arg1 == X || Arg1 == Y)
- return Arg0;
- }
-
// TODO: fmax(nnan x, -inf) -> x
// TODO: fmax(nnan ninf x, -flt_max) -> x
if (C1 && C1->isInfinity()) {
OpenPOWER on IntegriCloud