From 722e9e6d0a5b67d136be40bc015abc5b0b32f97b Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Thu, 27 Jun 2013 09:27:40 +0000 Subject: [SystemZ] Add conditional store patterns Add pseudo conditional store instructions, so that we use: branch foo: store foo: instead of: load branch foo: move foo: store z196 has real 32-bit and 64-bit conditional stores, but we don't use any z196 instructions yet. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185065 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/SystemZ/SystemZOperators.td | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'lib/Target/SystemZ/SystemZOperators.td') diff --git a/lib/Target/SystemZ/SystemZOperators.td b/lib/Target/SystemZ/SystemZOperators.td index ab01b25..021824e 100644 --- a/lib/Target/SystemZ/SystemZOperators.td +++ b/lib/Target/SystemZ/SystemZOperators.td @@ -120,6 +120,20 @@ def zext32 : PatFrag<(ops node:$src), (zext (i32 node:$src))>; def loadf32 : PatFrag<(ops node:$src), (f32 (load node:$src))>; def loadf64 : PatFrag<(ops node:$src), (f64 (load node:$src))>; +// Extending loads in which the extension type doesn't matter. +def anyextload : PatFrag<(ops node:$ptr), (unindexedload node:$ptr), [{ + return cast(N)->getExtensionType() != ISD::NON_EXTLOAD; +}]>; +def anyextloadi8 : PatFrag<(ops node:$ptr), (anyextload node:$ptr), [{ + return cast(N)->getMemoryVT() == MVT::i8; +}]>; +def anyextloadi16 : PatFrag<(ops node:$ptr), (anyextload node:$ptr), [{ + return cast(N)->getMemoryVT() == MVT::i16; +}]>; +def anyextloadi32 : PatFrag<(ops node:$ptr), (anyextload node:$ptr), [{ + return cast(N)->getMemoryVT() == MVT::i32; +}]>; + // Aligned loads. class AlignedLoad : PatFrag<(ops node:$addr), (load node:$addr), [{ @@ -149,7 +163,10 @@ class NonvolatileLoad LoadSDNode *Load = cast(N); return !Load->isVolatile(); }]>; -def nonvolatile_load : NonvolatileLoad; +def nonvolatile_load : NonvolatileLoad; +def nonvolatile_anyextloadi8 : NonvolatileLoad; +def nonvolatile_anyextloadi16 : NonvolatileLoad; +def nonvolatile_anyextloadi32 : NonvolatileLoad; // Non-volatile stores. class NonvolatileStore @@ -157,7 +174,10 @@ class NonvolatileStore StoreSDNode *Store = cast(N); return !Store->isVolatile(); }]>; -def nonvolatile_store : NonvolatileStore; +def nonvolatile_store : NonvolatileStore; +def nonvolatile_truncstorei8 : NonvolatileStore; +def nonvolatile_truncstorei16 : NonvolatileStore; +def nonvolatile_truncstorei32 : NonvolatileStore; // Insertions. def inserti8 : PatFrag<(ops node:$src1, node:$src2), -- cgit v1.1