aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMon P Wang <wangmp@apple.com>2009-04-27 07:22:10 +0000
committerMon P Wang <wangmp@apple.com>2009-04-27 07:22:10 +0000
commitdc97d5ad4f8b7d54051d6e5d7a29dd15596d4735 (patch)
treef7968e5e1adac8b5ad41baeed43aa9e205bcda67 /lib
parent924fc91924c5831f41f62976012564d165af12d0 (diff)
downloadexternal_llvm-dc97d5ad4f8b7d54051d6e5d7a29dd15596d4735.zip
external_llvm-dc97d5ad4f8b7d54051d6e5d7a29dd15596d4735.tar.gz
external_llvm-dc97d5ad4f8b7d54051d6e5d7a29dd15596d4735.tar.bz2
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
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/X86/X86InstrInfo.td18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/Target/X86/X86InstrInfo.td b/lib/Target/X86/X86InstrInfo.td
index 3aa3447..325dde0 100644
--- a/lib/Target/X86/X86InstrInfo.td
+++ b/lib/Target/X86/X86InstrInfo.td
@@ -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;
}]>;