[PATCH] D95456: [ARM] i16 insert-of-extract to VINS pattern

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 4 11:58:31 PST 2021


dmgreen added inline comments.


================
Comment at: llvm/lib/Target/ARM/ARMInstrMVE.td:1882
+  def : Pat<(ARMinsertelt (v8i16 MQPR:$src1), (ARMvgetlaneu (v8i16 MQPR:$src2), imm_even:$extlane), imm_odd:$inslane),
+            (COPY_TO_REGCLASS (INSERT_SUBREG (v4f32 (COPY_TO_REGCLASS MQPR:$src1, MQPR)),
+                                (VINSH (EXTRACT_SUBREG MQPR:$src1, (SSubReg_f16_reg imm_odd:$inslane)),
----------------
simon_tatham wrote:
> I don't understand this part – if $src1 is already an MQPR, why does it need a COPY_TO_REGCLASS?
Hmm. I added it as a typecast, essentially. Otherwise the INSERT_SUBREG fails to make it through the tablegen type checks. Trying it as `(INSERT_SUBREG (v4f32 MQPR:$src1), ...` gives an error that looks like the insertsubreg has conflicting input types
`(INSERT_SUBREG:{ *:[v4f32] } MQPR:{ *:[] }:$src1`


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D95456/new/

https://reviews.llvm.org/D95456



More information about the llvm-commits mailing list