This is an archive of the discontinued LLVM Phabricator instance.

[SelectionDAG] DAG combiner for fminnan and fmaxnan
ClosedPublic

Authored by tlively on Oct 1 2018, 8:01 PM.

Diff Detail

Event Timeline

tlively created this revision.Oct 1 2018, 8:01 PM

Is there any tests?

Is there any tests?

No, I haven't been able to find any existing tests or an obvious place to add new ones for DAG combining. I guess the fact that all the backends still work is something.

So this change is not necessarily related to minimum/maximum new intrinsics, because they are pre-existing. So this means FMINNAN/FMAXNAN nodes have not been optimized in DAG combiner so far. Strange. Anyway apparently what this does is constant folding on DAG nodes, so I think we can come up with a test?

lib/CodeGen/SelectionDAG/DAGCombiner.cpp
12110

Is this line clang-formatted?

tlively updated this revision to Diff 170502.Oct 22 2018, 2:44 PM
tlively marked an inline comment as done.
  • Formatting and tests
tlively added inline comments.Oct 22 2018, 2:46 PM
test/CodeGen/WebAssembly/simd-arith.ll
827 ↗(On Diff #170502)

These transpositions show the canonicalization working.

aheejin accepted this revision.Oct 24 2018, 3:02 PM
This revision is now accepted and ready to land.Oct 24 2018, 3:02 PM
This revision was automatically updated to reflect the committed changes.