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

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 10 11:30:22 PDT 2018


efriedma added inline comments.


================
Comment at: lib/Target/ARM/ARMInstrNEON.td:5065
+                      v4i32, v4i32, or, 1> {
+  let isMoveReg = 1;
+}
----------------
An "or" is only a move if the two inputs are the same register; does that really meet the requirements of isMoveReg?


================
Comment at: lib/Target/ARM/ARMInstrThumb.td:1158
 let hasSideEffects = 0 in {
+let isMoveReg = 1 in
 def tMOVr : Thumb1pI<(outs GPR:$Rd), (ins GPR:$Rm), AddrModeNone,
----------------
For targets older than armv6, "movs" is a lot more common than "mov"; you probably want to handle that too?


================
Comment at: lib/Target/ARM/ARMInstrVFP.td:1027
+let isMoveReg = 1 in {
 def VMOVRS : AVConv2I<0b11100001, 0b1010,
                       (outs GPR:$Rt), (ins SPR:$Sn),
----------------
We usually use VMOVRRD (which moves two 32-bit integers into one 64-bit register) rather than VMOVRS; is there some way you can treat that as a "copy"?


https://reviews.llvm.org/D45204





More information about the llvm-commits mailing list