[PATCH] D15134: Part 1 to fix x86_64 fp128 calling convention.

Chih-Hung Hsieh via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 2 13:48:59 PST 2015


chh marked 11 inline comments as done.

================
Comment at: lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp:117
@@ -111,4 +116,3 @@
     SetSoftenedFloat(SDValue(N, ResNo), R);
-}
-
-SDValue DAGTypeLegalizer::SoftenFloatRes_BITCAST(SDNode *N) {
+    // Some soften sub-methods, e.g. those calling TLI.makeLibCall,
+    // do not call ReplaceValueWith and depend on the ScanOperands
----------------
davidxl wrote:
> Put those comments and replace code into a small wrapper -- 'replaceValueIfNeeded'.
Use a new small wrapper called ReplaceSoftenFloatResult.


================
Comment at: lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp:787
@@ +786,3 @@
+    // be euqal to N.
+    if (Res.getNode() == N && LegalInHWReg)
+      return false;
----------------
davidxl wrote:
> Is the first condition needed?  If Res.getNode() != N, ReplaceValueWith should also be called (see below), so this condition does not look correct.
Yes, it is necessary. It's not about Res.getNode()!=N.
When Res.getNode() == N,
(a) if LegalInHWReg, return false and do not reanalyze
(b) Otherwise, at line 799, return true and reanalyze
 


http://reviews.llvm.org/D15134





More information about the llvm-commits mailing list