From a7e01d7efde112c31b8369c7af8aa51ff9eec01b Mon Sep 17 00:00:00 2001 From: Mon P Wang Date: Mon, 27 Apr 2009 07:22:10 +0000 Subject: [PATCH] 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 --- lib/Target/X86/X86InstrInfo.td | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/Target/X86/X86InstrInfo.td b/lib/Target/X86/X86InstrInfo.td index 3aa344738d0..325dde00b70 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(N); if (const Value *Src = LD->getSrcValue()) if (const PointerType *PT = dyn_cast(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(N); if (const Value *Src = LD->getSrcValue()) if (const PointerType *PT = dyn_cast(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(N); if (const Value *Src = LD->getSrcValue()) if (const PointerType *PT = dyn_cast(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(N); if (const Value *Src = LD->getSrcValue()) if (const PointerType *PT = dyn_cast(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(N)->getSrcValue()) if (const PointerType *PT = dyn_cast(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(N)->getSrcValue()) if (const PointerType *PT = dyn_cast(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(N)->getSrcValue()) if (const PointerType *PT = dyn_cast(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(N)->getSrcValue()) if (const PointerType *PT = dyn_cast(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(N)->getSrcValue()) if (const PointerType *PT = dyn_cast(Src->getType())) - if (PT->getAddressSpace() != 0) + if (PT->getAddressSpace() > 255) return false; return true; }]>;