[PATCH] [SDAG] Move TRUNCATE splitting logic into a helper, and use it more liberally

James Molloy james.molloy at arm.com
Mon Mar 23 08:43:50 PDT 2015


Hi chandlerc,

SplitVecOp_TRUNCATE has logic for recursively splitting oversize vectors that need more than one round of splitting to become legal. There are many other ISD nodes that could benefit from this logic, so factor it out and use it for FP_TO_UINT,FP_TO_SINT,SINT_TO_FP,UINT_TO_FP and FTRUNC.

Chandler, we discussed this problem on IRC previously and you suggested that we change FP_TO_SINT and friends to never modify the width of a type, and rely on SelectionDAGBuilder to insert extra TRUNCATE nodes. While that sounded fine, it was going to be a very invasive change so I propose this instead; it's not much code and has almost no duplication.

REPOSITORY
  rL LLVM

http://reviews.llvm.org/D8550

Files:
  lib/CodeGen/SelectionDAG/LegalizeTypes.h
  lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
  test/CodeGen/AArch64/arm64-convert-v4f64.ll
  test/CodeGen/AArch64/vcvt-oversize.ll
  test/CodeGen/ARM/vcvt.ll

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D8550.22474.patch
Type: text/x-patch
Size: 7820 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150323/a6323ea0/attachment.bin>


More information about the llvm-commits mailing list