[PATCH] D34579: Fold fneg and fabs like multiplications
Hal Finkel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 23 16:18:28 PDT 2017
hfinkel added inline comments.
================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:9772
+ switch (CC) {
+ default: break;
+ case ISD::SETOLT:
----------------
According to the docs in include/llvm/CodeGen/ISDOpcodes.h, for floating point you should handle the SETLT and friends as well (these just mean that it is undefined if the input is NaN).
================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:9776
+ case ISD::SETOLE:
+ case ISD::SETULE: std::swap(True, False); // Fall through
+ case ISD::SETOGT:
----------------
Visually, I'd prefer that the std::swap be on its own line below this one. Otherwise, it looks like all of the condition code fall through to the bottom.
https://reviews.llvm.org/D34579
More information about the llvm-commits
mailing list