[PATCH] D15134: Part 1 to fix x86_64 fp128 calling convention.
David Li via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 2 16:55:00 PST 2015
davidxl added inline comments.
================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:8776
@@ -8769,1 +8775,3 @@
+ if ((N1.getOpcode() == ISD::FP_EXTEND || N1.getOpcode() == ISD::FP_ROUND) &&
+ (N1VT == N1Op0VT || N1Op0VT != MVT::f128))
return DAG.getNode(ISD::FCOPYSIGN, SDLoc(N), VT,
----------------
The comment of the method should clarify the intention -- I am not worried about naming.
================
Comment at: lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp:775
@@ +774,3 @@
+ if (!isLegalInHWReg(N->getOperand(OpNo).getValueType()))
+ return false;
+ // When the operand type can be kept in registers, SoftenFloatResult
----------------
ok -- better change the name of the function to 'CanSkipSoft...'
================
Comment at: lib/CodeGen/SelectionDAG/LegalizeTypes.h:400
@@ +399,3 @@
+ if (!SoftenedOp.getNode() &&
+ isSimpleLegalType(Op.getValueType()))
+ return Op;
----------------
With the original code, this branch should never be taken -- so the new assertion should be safe, right?
================
Comment at: lib/CodeGen/SelectionDAG/LegalizeTypes.h:414
@@ +413,3 @@
+ // by calling ReplaceValueWith here to update all users.
+ if (NewRes.getNode() != N && isLegalInHWReg(N->getValueType(ResNo)))
+ ReplaceValueWith(SDValue(N, ResNo), NewRes);
----------------
ok
http://reviews.llvm.org/D15134
More information about the llvm-commits
mailing list