[PATCH] D30741: [DAG] recognize div/rem by 0 as undef before trying constant folding

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 8 09:12:24 PST 2017


spatel updated this revision to Diff 91029.
spatel edited the summary of this revision.
spatel added a comment.

Patch updated:
Changing the definition of isConstantOrConstantVector() to include undef may have unintended consequences (there's a test in test/CodeGen/ARM/select.ll that will trigger the assert in foldBinOpIntoSelect()), so just assert that an undef result from DAG.getNode() is ok for now.


https://reviews.llvm.org/D30741

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D30741.91029.patch
Type: text/x-patch
Size: 5482 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170308/8ad4684a/attachment.bin>


More information about the llvm-commits mailing list