[PATCH] D30878: [SelectionDAG] Enhance SDTCisSameNumEltsAs to work with scalar types and use it on extend/trunc/round operations

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 12 16:59:16 PDT 2017


craig.topper created this revision.

Currently we don't enforce that ISD::ANY_EXTEND, ZERO_EXTEND, SIGN_EXTEND, TRUNC, FP_ROUND, FP_EXTEND have the same number of elements(including scalar) between their input and output. Though we have them documented as such. Up until a few months ago x86 created nodes that violated this rule. That's all been fixed now, and we should enforce the rule going forward.

In order to do this we need to allow SDTCisSameNumEltsAs to support scalar types and not enforce being a vector. If one type is scalar we will force the other type to also be scalar.


https://reviews.llvm.org/D30878

Files:
  include/llvm/Target/TargetSelectionDAG.td
  utils/TableGen/CodeGenDAGPatterns.cpp
  utils/TableGen/CodeGenDAGPatterns.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D30878.91512.patch
Type: text/x-patch
Size: 7816 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170312/5cec51c9/attachment.bin>


More information about the llvm-commits mailing list