[PATCH] D37130: [x86] Teach the backend to fold more read-modify-write memory operands to instructions.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 24 22:16:05 PDT 2017


craig.topper added inline comments.


================
Comment at: lib/Target/X86/X86ISelDAGToDAG.cpp:2032
 //
-// FIXME: This should handle a wide range of operations which support RMW
-// memory operands, not just inc and dec.
+// Until then, we manually fold these and instruction select he operation here.
 bool X86DAGToDAGISel::foldLoadStoreIntoMemOperand(SDNode *Node) {
----------------
he->the


================
Comment at: lib/Target/X86/X86ISelDAGToDAG.cpp:2044
+  // actually lowers the opcodes.
+  switch (MemVT.getSimpleVT().SimpleTy) {
+  default:
----------------
Maybe just put back the if statement we had before? 

if (MemVT != MVT::i64 && MemVT != MVT::i32 && MemVT != MVT::i16 && MemVT != MVT::8)
  return false;


https://reviews.llvm.org/D37130





More information about the llvm-commits mailing list