From 2e934b978c09eaf7b692ca652eaa0ed7a8d13b12 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 3 Mar 2010 02:14:54 +0000 Subject: [PATCH] remove nvload and two patterns that use it which are better done by dag combine. llvm-svn: 97633 --- lib/Target/X86/X86InstrInfo.td | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/lib/Target/X86/X86InstrInfo.td b/lib/Target/X86/X86InstrInfo.td index a417f23a65d..cfe71a5acbc 100644 --- a/lib/Target/X86/X86InstrInfo.td +++ b/lib/Target/X86/X86InstrInfo.td @@ -417,23 +417,6 @@ def loadi32 : PatFrag<(ops node:$ptr), (i32 (unindexedload node:$ptr)), [{ return false; }]>; -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() > 255) - return false; - if (LD->isVolatile()) - return false; - ISD::LoadExtType ExtType = LD->getExtensionType(); - if (ExtType == ISD::NON_EXTLOAD) - return true; - if (ExtType == ISD::EXTLOAD) - return LD->getAlignment() >= 4; - return false; -}]>; - - def loadi8 : PatFrag<(ops node:$ptr), (i8 (dsload node:$ptr))>; def loadi64 : PatFrag<(ops node:$ptr), (i64 (dsload node:$ptr))>; def loadf32 : PatFrag<(ops node:$ptr), (f32 (dsload node:$ptr))>; @@ -4416,12 +4399,6 @@ def : Pat<(i16 (anyext GR8 :$src)), (MOVZX16rr8 GR8 :$src)>; def : Pat<(i32 (anyext GR8 :$src)), (MOVZX32rr8 GR8 :$src)>; def : Pat<(i32 (anyext GR16:$src)), (MOVZX32rr16 GR16:$src)>; -// (and (i32 load), 255) -> (zextload i8) -def : Pat<(i32 (and (nvloadi32 addr:$src), (i32 255))), - (MOVZX32rm8 addr:$src)>; -def : Pat<(i32 (and (nvloadi32 addr:$src), (i32 65535))), - (MOVZX32rm16 addr:$src)>; - //===----------------------------------------------------------------------===// // Some peepholes //===----------------------------------------------------------------------===//