[PATCH] D59244: [DAG] Move integer setcc %x, %x folding into FoldSetCC

Tim Northover via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 12 07:33:44 PDT 2019


t.p.northover added inline comments.


================
Comment at: lib/CodeGen/SelectionDAG/TargetLowering.cpp:3007-3008
     // constant being emitted.
+    assert(!N0.getValueType().isInteger() &&
+           "Integer types should be handled by FoldSetCC");
 
----------------
RKSimon wrote:
> t.p.northover wrote:
> > I think you might still get here if someone does a sneaky `MorphNodeTo` behind your back. Might be safer to bail with non-debug code.
> FoldSetCC is called at the start of this function now so I think we should be safe - but I'm happy to update the if to:
> ```
> if (N0 == N1 && !N0.getValueType().isInteger()) {
> ```
Is that new? I can't see it in my source.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D59244





More information about the llvm-commits mailing list