[PATCH] D11172: LegalizeDAG: Fix and improve FCOPYSIGN/FABS legalization
hfinkel@anl.gov via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 11 09:31:04 PST 2015
hfinkel accepted this revision.
hfinkel added a reviewer: hfinkel.
hfinkel added a comment.
This revision is now accepted and ready to land.
A couple comments below, otherwise, LGTM.
================
Comment at: lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1638
@@ +1637,3 @@
+ SDLoc DL, SDValue NewIntValue) const {
+ if (!State.Chain) {
+ return DAG.getNode(ISD::BITCAST, DL, State.FloatVT, NewIntValue);
----------------
No { } needed here.
================
Comment at: lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1666
@@ +1665,3 @@
+ EVT FloatVT = Mag.getValueType();
+ if (TLI.isOperationLegalOrCustom(ISD::FABS, FloatVT) &&
+ TLI.isOperationLegalOrCustom(ISD::FNEG, FloatVT)) {
----------------
It looks like this FABS check and expansion can be moved before the call to getSignAsIntValue, and if so, please do that.
Repository:
rL LLVM
http://reviews.llvm.org/D11172
More information about the llvm-commits
mailing list