[PATCH] D25374: [DAGCombiner] Update most ADD combines to support general vector combines

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 8 15:03:20 PDT 2016


RKSimon updated this revision to Diff 74050.
RKSimon added a comment.

Updated isNonOpaqueConstantOrConstantVector to isNonOpaqueConstantOrNonOpaqueConstantVector to check that no vector elements are opaque constants. Also added isConstantOrConstantVector helper that doesn't care about opaque. Both of these allow undef vector elements.

Updated the helpers to not allow implicit truncation in build vectors - this will be necessary for the reuse of these helpers in other combines (e.g. SUB and MUL). This isn't necessary for the isNullConstantOrNullSplatConstant case.


Repository:
  rL LLVM

https://reviews.llvm.org/D25374

Files:
  lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  test/CodeGen/X86/combine-add.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25374.74050.patch
Type: text/x-patch
Size: 13030 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161008/1be5761b/attachment.bin>


More information about the llvm-commits mailing list