This is an archive of the discontinued LLVM Phabricator instance.

[NFC][PowerPC] Simplify the logic in lower select_cc
ClosedPublic

Authored by steven.zhang on Mar 8 2020, 8:12 PM.

Details

Summary

The logic in select_cc is messy and hard to follow. This is a NFC patch to simplify the logic.

Diff Detail

Event Timeline

steven.zhang created this revision.Mar 8 2020, 8:12 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 8 2020, 8:12 PM
ZhangKang added inline comments.
llvm/lib/Target/PowerPC/PPCISelLowering.cpp
7594–7595

Above comments should be splitted into 2 parts
One is below, it should before the line 7569.

// We might be able to do better than this under some circumstances, but in
  // general, fsel-based lowering of select is a finite-math-only optimization.
  // For more information, see section F.3 of the 2.06 ISA specification.

The other is below, it should before the line 7556.

// With ISA 3.0, we have xsmaxcdp/xsmincdp which are OK to emit even in the
  // presence of infinities.

You patch is similar without the patch https://reviews.llvm.org/D62993 .

steven.zhang added reviewers: nemanjai, ZhangKang.

Update the comments.

This revision is now accepted and ready to land.Mar 9 2020, 10:25 PM
This revision was automatically updated to reflect the committed changes.