Fix predicates for unindexed stores so they don't accidentally match indexed

stores.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31735 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2006-11-14 19:13:39 +00:00
parent 6a5339ba65
commit fc14b31540

View File

@ -511,7 +511,8 @@ def zextloadi32 : PatFrag<(ops node:$ptr), (ld node:$ptr), [{
def store : PatFrag<(ops node:$val, node:$ptr),
(st node:$val, node:$ptr), [{
if (StoreSDNode *ST = dyn_cast<StoreSDNode>(N))
return !ST->isTruncatingStore();
return !ST->isTruncatingStore() &&
ST->getAddressingMode() == ISD::UNINDEXED;
return false;
}]>;
@ -519,31 +520,36 @@ def store : PatFrag<(ops node:$val, node:$ptr),
def truncstorei1 : PatFrag<(ops node:$val, node:$ptr),
(st node:$val, node:$ptr), [{
if (StoreSDNode *ST = dyn_cast<StoreSDNode>(N))
return ST->isTruncatingStore() && ST->getStoredVT() == MVT::i1;
return ST->isTruncatingStore() && ST->getStoredVT() == MVT::i1 &&
ST->getAddressingMode() == ISD::UNINDEXED;
return false;
}]>;
def truncstorei8 : PatFrag<(ops node:$val, node:$ptr),
(st node:$val, node:$ptr), [{
if (StoreSDNode *ST = dyn_cast<StoreSDNode>(N))
return ST->isTruncatingStore() && ST->getStoredVT() == MVT::i8;
return ST->isTruncatingStore() && ST->getStoredVT() == MVT::i8 &&
ST->getAddressingMode() == ISD::UNINDEXED;
return false;
}]>;
def truncstorei16 : PatFrag<(ops node:$val, node:$ptr),
(st node:$val, node:$ptr), [{
if (StoreSDNode *ST = dyn_cast<StoreSDNode>(N))
return ST->isTruncatingStore() && ST->getStoredVT() == MVT::i16;
return ST->isTruncatingStore() && ST->getStoredVT() == MVT::i16 &&
ST->getAddressingMode() == ISD::UNINDEXED;
return false;
}]>;
def truncstorei32 : PatFrag<(ops node:$val, node:$ptr),
(st node:$val, node:$ptr), [{
if (StoreSDNode *ST = dyn_cast<StoreSDNode>(N))
return ST->isTruncatingStore() && ST->getStoredVT() == MVT::i32;
return ST->isTruncatingStore() && ST->getStoredVT() == MVT::i32 &&
ST->getAddressingMode() == ISD::UNINDEXED;
return false;
}]>;
def truncstoref32 : PatFrag<(ops node:$val, node:$ptr),
(st node:$val, node:$ptr), [{
if (StoreSDNode *ST = dyn_cast<StoreSDNode>(N))
return ST->isTruncatingStore() && ST->getStoredVT() == MVT::f32;
return ST->isTruncatingStore() && ST->getStoredVT() == MVT::f32 &&
ST->getAddressingMode() == ISD::UNINDEXED;
return false;
}]>;