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(N)->isVolatile(); +}]>; +def nonvolatile_store : PatFrag<(ops node:$val, node:$ptr), + (store node:$val, node:$ptr), [{ + return !cast(N)->isVolatile(); +}]>; + // nontemporal store fragments. def nontemporalstore : PatFrag<(ops node:$val, node:$ptr), (store node:$val, node:$ptr), [{ 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(N); return !Load->isVolatile(); }]>; -def nonvolatile_load : NonvolatileLoad; def nonvolatile_anyextloadi8 : NonvolatileLoad; def nonvolatile_anyextloadi16 : NonvolatileLoad; def nonvolatile_anyextloadi32 : NonvolatileLoad; @@ -567,7 +566,6 @@ auto *Store = cast(N); return !Store->isVolatile(); }]>; -def nonvolatile_store : NonvolatileStore; def nonvolatile_truncstorei8 : NonvolatileStore; def nonvolatile_truncstorei16 : NonvolatileStore; def nonvolatile_truncstorei32 : NonvolatileStore; 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(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.