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

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 12 09:09:40 PDT 2019


RKSimon marked an inline comment as done.
RKSimon 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");
 
----------------
t.p.northover wrote:
> 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.
I committed it yesterday in rL355828


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