mirror of
https://github.com/RPCS3/llvm.git
synced 2025-02-01 00:02:16 +00:00
Revised 68749 to allow matching of load/stores for address spaces < 256.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70197 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e2bcf13be5
commit
a7e01d7efd
@ -286,7 +286,7 @@ def loadi16 : PatFrag<(ops node:$ptr), (i16 (unindexedload node:$ptr)), [{
|
||||
LoadSDNode *LD = cast<LoadSDNode>(N);
|
||||
if (const Value *Src = LD->getSrcValue())
|
||||
if (const PointerType *PT = dyn_cast<PointerType>(Src->getType()))
|
||||
if (PT->getAddressSpace() != 0)
|
||||
if (PT->getAddressSpace() > 255)
|
||||
return false;
|
||||
ISD::LoadExtType ExtType = LD->getExtensionType();
|
||||
if (ExtType == ISD::NON_EXTLOAD)
|
||||
@ -300,7 +300,7 @@ def loadi16_anyext : PatFrag<(ops node:$ptr), (i32 (unindexedload node:$ptr)), [
|
||||
LoadSDNode *LD = cast<LoadSDNode>(N);
|
||||
if (const Value *Src = LD->getSrcValue())
|
||||
if (const PointerType *PT = dyn_cast<PointerType>(Src->getType()))
|
||||
if (PT->getAddressSpace() != 0)
|
||||
if (PT->getAddressSpace() > 255)
|
||||
return false;
|
||||
ISD::LoadExtType ExtType = LD->getExtensionType();
|
||||
if (ExtType == ISD::EXTLOAD)
|
||||
@ -312,7 +312,7 @@ def loadi32 : PatFrag<(ops node:$ptr), (i32 (unindexedload node:$ptr)), [{
|
||||
LoadSDNode *LD = cast<LoadSDNode>(N);
|
||||
if (const Value *Src = LD->getSrcValue())
|
||||
if (const PointerType *PT = dyn_cast<PointerType>(Src->getType()))
|
||||
if (PT->getAddressSpace() != 0)
|
||||
if (PT->getAddressSpace() > 255)
|
||||
return false;
|
||||
ISD::LoadExtType ExtType = LD->getExtensionType();
|
||||
if (ExtType == ISD::NON_EXTLOAD)
|
||||
@ -326,7 +326,7 @@ def nvloadi32 : PatFrag<(ops node:$ptr), (i32 (unindexedload node:$ptr)), [{
|
||||
LoadSDNode *LD = cast<LoadSDNode>(N);
|
||||
if (const Value *Src = LD->getSrcValue())
|
||||
if (const PointerType *PT = dyn_cast<PointerType>(Src->getType()))
|
||||
if (PT->getAddressSpace() != 0)
|
||||
if (PT->getAddressSpace() > 255)
|
||||
return false;
|
||||
if (LD->isVolatile())
|
||||
return false;
|
||||
@ -348,14 +348,14 @@ def gsload : PatFrag<(ops node:$ptr), (load node:$ptr), [{
|
||||
def loadi8 : PatFrag<(ops node:$ptr), (i8 (load node:$ptr)), [{
|
||||
if (const Value *Src = cast<LoadSDNode>(N)->getSrcValue())
|
||||
if (const PointerType *PT = dyn_cast<PointerType>(Src->getType()))
|
||||
if (PT->getAddressSpace() != 0)
|
||||
if (PT->getAddressSpace() > 255)
|
||||
return false;
|
||||
return true;
|
||||
}]>;
|
||||
def loadi64 : PatFrag<(ops node:$ptr), (i64 (load node:$ptr)), [{
|
||||
if (const Value *Src = cast<LoadSDNode>(N)->getSrcValue())
|
||||
if (const PointerType *PT = dyn_cast<PointerType>(Src->getType()))
|
||||
if (PT->getAddressSpace() != 0)
|
||||
if (PT->getAddressSpace() > 255)
|
||||
return false;
|
||||
return true;
|
||||
}]>;
|
||||
@ -363,21 +363,21 @@ def loadi64 : PatFrag<(ops node:$ptr), (i64 (load node:$ptr)), [{
|
||||
def loadf32 : PatFrag<(ops node:$ptr), (f32 (load node:$ptr)), [{
|
||||
if (const Value *Src = cast<LoadSDNode>(N)->getSrcValue())
|
||||
if (const PointerType *PT = dyn_cast<PointerType>(Src->getType()))
|
||||
if (PT->getAddressSpace() != 0)
|
||||
if (PT->getAddressSpace() > 255)
|
||||
return false;
|
||||
return true;
|
||||
}]>;
|
||||
def loadf64 : PatFrag<(ops node:$ptr), (f64 (load node:$ptr)), [{
|
||||
if (const Value *Src = cast<LoadSDNode>(N)->getSrcValue())
|
||||
if (const PointerType *PT = dyn_cast<PointerType>(Src->getType()))
|
||||
if (PT->getAddressSpace() != 0)
|
||||
if (PT->getAddressSpace() > 255)
|
||||
return false;
|
||||
return true;
|
||||
}]>;
|
||||
def loadf80 : PatFrag<(ops node:$ptr), (f80 (load node:$ptr)), [{
|
||||
if (const Value *Src = cast<LoadSDNode>(N)->getSrcValue())
|
||||
if (const PointerType *PT = dyn_cast<PointerType>(Src->getType()))
|
||||
if (PT->getAddressSpace() != 0)
|
||||
if (PT->getAddressSpace() > 255)
|
||||
return false;
|
||||
return true;
|
||||
}]>;
|
||||
|
Loading…
x
Reference in New Issue
Block a user