[PATCH] D13665: [DAG] Add common vector constant folding helper function

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 12 11:24:19 PDT 2015


RKSimon created this revision.
RKSimon added reviewers: qcolombet, hfinkel, spatel, andreadb.
RKSimon added a subscriber: llvm-commits.
RKSimon set the repository for this revision to rL LLVM.

We have a number of functions that implement constant folding of vectors (unary and binary ops) in near identical manners (and the differences don't appear to be critical). 

This patch introduces a common implementation (SelectionDAG::FoldConstantVectorArithmetic) and calls this in both the unary and binary op cases.

After this initial patch I intend to begin enabling vector constant folding for a wider number of opcodes in SelectionDAG::getNode().

Repository:
  rL LLVM

http://reviews.llvm.org/D13665

Files:
  include/llvm/CodeGen/SelectionDAG.h
  lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  lib/CodeGen/SelectionDAG/SelectionDAG.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13665.37136.patch
Type: text/x-patch
Size: 10629 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151012/1602bb4d/attachment.bin>


More information about the llvm-commits mailing list