[PATCH] D30826: [DAG] vector div/rem with any zero element in divisor is undef

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 13 07:46:33 PDT 2017


spatel updated this revision to Diff 91560.
spatel marked an inline comment as done.
spatel added a comment.

Patch updated:

1. The code duplication was already bugging me, and we know it's only going to grow over time, so I'm proposing a single place to house the undef  checking. Fixing the duplication between FoldConstantArithmetic and FoldConstantVectorArithmetic is another step.
2. Fixed to check for zero or undef elements in the build vector.


https://reviews.llvm.org/D30826

Files:
  include/llvm/CodeGen/SelectionDAG.h
  lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  lib/CodeGen/SelectionDAG/SelectionDAG.cpp
  test/CodeGen/X86/div-rem-simplify.ll
  test/CodeGen/X86/vec_sdiv_to_shift.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D30826.91560.patch
Type: text/x-patch
Size: 6114 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170313/68d9bc10/attachment.bin>


More information about the llvm-commits mailing list