[PATCH] D50358: [SelectionDAG][X86][SystemZ] Add a generic nonvolatile_store/nonvolatile_load pattern fragment in TargetSelectionDAG.td
Phabricator via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 7 10:35:26 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL339156: [SelectionDAG][X86][SystemZ] Add a generic nonvolatile_store/nonvolatile_load… (authored by ctopper, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D50358?vs=159381&id=159541#toc
Repository:
rL LLVM
https://reviews.llvm.org/D50358
Files:
llvm/trunk/include/llvm/Target/TargetSelectionDAG.td
llvm/trunk/lib/Target/SystemZ/SystemZOperators.td
llvm/trunk/lib/Target/X86/X86InstrCompiler.td
Index: llvm/trunk/include/llvm/Target/TargetSelectionDAG.td
===================================================================
--- llvm/trunk/include/llvm/Target/TargetSelectionDAG.td
+++ llvm/trunk/include/llvm/Target/TargetSelectionDAG.td
@@ -1067,6 +1067,15 @@
let MemoryVT = f32;
}
+def nonvolatile_load : PatFrag<(ops node:$ptr),
+ (load node:$ptr), [{
+ return !cast<LoadSDNode>(N)->isVolatile();
+}]>;
+def nonvolatile_store : PatFrag<(ops node:$val, node:$ptr),
+ (store node:$val, node:$ptr), [{
+ return !cast<StoreSDNode>(N)->isVolatile();
+}]>;
+
// nontemporal store fragments.
def nontemporalstore : PatFrag<(ops node:$val, node:$ptr),
(store node:$val, node:$ptr), [{
Index: llvm/trunk/lib/Target/X86/X86InstrCompiler.td
===================================================================
--- llvm/trunk/lib/Target/X86/X86InstrCompiler.td
+++ llvm/trunk/lib/Target/X86/X86InstrCompiler.td
@@ -1006,12 +1006,6 @@
// DAG Pattern Matching Rules
//===----------------------------------------------------------------------===//
-def nonvolatile_store : PatFrag<(ops node:$val, node:$ptr),
- (store node:$val, node:$ptr), [{
- return !cast<StoreSDNode>(N)->isVolatile();
-}]>;
-
-
// Use AND/OR to store 0/-1 in memory when optimizing for minsize. This saves
// binary size compared to a regular MOV, but it introduces an unnecessary
// load, so is not suitable for regular or optsize functions.
Index: llvm/trunk/lib/Target/SystemZ/SystemZOperators.td
===================================================================
--- llvm/trunk/lib/Target/SystemZ/SystemZOperators.td
+++ llvm/trunk/lib/Target/SystemZ/SystemZOperators.td
@@ -556,7 +556,6 @@
auto *Load = cast<LoadSDNode>(N);
return !Load->isVolatile();
}]>;
-def nonvolatile_load : NonvolatileLoad<load>;
def nonvolatile_anyextloadi8 : NonvolatileLoad<anyextloadi8>;
def nonvolatile_anyextloadi16 : NonvolatileLoad<anyextloadi16>;
def nonvolatile_anyextloadi32 : NonvolatileLoad<anyextloadi32>;
@@ -567,7 +566,6 @@
auto *Store = cast<StoreSDNode>(N);
return !Store->isVolatile();
}]>;
-def nonvolatile_store : NonvolatileStore<store>;
def nonvolatile_truncstorei8 : NonvolatileStore<truncstorei8>;
def nonvolatile_truncstorei16 : NonvolatileStore<truncstorei16>;
def nonvolatile_truncstorei32 : NonvolatileStore<truncstorei32>;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50358.159541.patch
Type: text/x-patch
Size: 2478 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180807/bc7e8af0/attachment.bin>
More information about the llvm-commits
mailing list