[PATCH] D45204: [X86][MIPS][ARM] New machine instruction property 'isMoveReg'

Quentin Colombet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 11 12:50:29 PDT 2018


qcolombet added a comment.

Hi,

The general direction makes sense and I agree you probably don't want to implement the full isEquivalentTo stuff I was talking about.
A general pointer you might have missed. We already track copy like instructions through isRegSequenceLike, isExtractSubRegLike and so on. These are more complicated than just plain copies though (e.g., VMOVRRD should already be supported).

Random thoughts:

- you may want to teach the peephole optimizer how to use that information to eliminate more copies.
- why can't you do your analysis before the instructions are lowered (i.e., when all that stuff are still copies).

Cheers,
-Quentin



================
Comment at: lib/Target/ARM/ARMBaseInstrInfo.cpp:941
+  // FIXME: VMOVRRD is also a copy instruction but it requires
+  //        special way of handling.
+  // VORRq is considered as a move only if two inputs are
----------------
VMOVRRD should already fall into the "extract sub reg" category. So there shouldn't be anything to do here.


https://reviews.llvm.org/D45204





More information about the llvm-commits mailing list