[PATCH] D13438: Start replacing vector_extract/vector_insert with extractelt/insertelt

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 5 09:03:09 PDT 2015


arsenm created this revision.
arsenm added a subscriber: llvm-commits.
Herald added subscribers: jyknight, arsenm, aemerson, jholewinski.

These are redundant pairs of nodes defined for
INSERT_VECTOR_ELEMENT/EXTRACT_VECTOR_ELEMENT.
insertelement/extractelement are slightly closer to the corresponding
C++ node name, and has stricter type checking so prefer it.
    
Update targets to only use these nodes where it is trivial to do so.
AArch64, ARM, and Mips all have various type errors on simple replacement,
so they will need work to fix.
    
 Example from AArch64:
    
def : Pat<(sext_inreg (vector_extract (v16i8 V128:$Rn), VectorIndexB:$idx), i8),
          (i32 (SMOVvi8to32 V128:$Rn, VectorIndexB:$idx))>;
    
Which is trying to do sext_inreg i8, i8.


http://reviews.llvm.org/D13438

Files:
  lib/Target/AArch64/AArch64InstrInfo.td
  lib/Target/AMDGPU/AMDGPUInstructions.td
  lib/Target/AMDGPU/SIInstructions.td
  lib/Target/NVPTX/NVPTXVector.td
  lib/Target/PowerPC/PPCInstrQPX.td
  lib/Target/PowerPC/PPCInstrVSX.td
  lib/Target/Sparc/SparcInstrInfo.td
  lib/Target/X86/X86InstrAVX512.td
  lib/Target/X86/X86InstrFragmentsSIMD.td
  lib/Target/X86/X86InstrMMX.td
  lib/Target/X86/X86InstrSSE.td

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13438.36522.patch
Type: text/x-patch
Size: 34016 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151005/60b54f65/attachment.bin>


More information about the llvm-commits mailing list