[PATCH] D91589: [DAGCombiner] Fold (sext (not i1 x)) -> (add (zext i1 x), -1)

Jorge Gorbe Moya via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 14 17:23:37 PST 2020


jgorbe added a comment.

Hi! We have bisected a clang crash to this patch. The following reduced test case crashes clang when built with `clang -O1 -frounding-math`:

  template <class> class a {
    int b() { return c == 0.0 ? 0 : -1; }
    int c;
  };
  template class a<long>;

A debug build of clang produces this "assertion failed" error:

  clang: /home/jgorbe/code/llvm/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:264: void {anonymous}::DAGCombiner::AddToWorklist(llvm::
  SDNode*): Assertion `N->getOpcode() != ISD::DELETED_NODE && "Deleted Node added to Worklist"' failed.




Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D91589/new/

https://reviews.llvm.org/D91589



More information about the llvm-commits mailing list