[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 10:21:58 PDT 2019


t.p.northover accepted this revision.
t.p.northover added inline comments.
This revision is now accepted and ready to land.


================
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:
> > 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
Ah, sorry. I thought you meant `MorphNodeTo` by "this" (my mistake). The assert is fine by me then.


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