[PATCH] D11172: LegalizeDAG: Fix and improve FCOPYSIGN/FABS legalization

hfinkel at anl.gov hfinkel at anl.gov
Sun Jul 26 06:20:17 PDT 2015


hfinkel added a subscriber: hfinkel.

================
Comment at: lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1579
@@ +1578,3 @@
+namespace {
+/// Keeps track of state when getting the sign of a floatingpoint value as an
+/// integer.
----------------
floatingpoint -> floating-point

================
Comment at: lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1593
@@ +1592,3 @@
+
+/// Bitcast a floatingpoint value to an integer value. Only bitcast the part
+/// containing the sign bit if the target has no integer value capable of
----------------
floatingpoint -> floating-point

================
Comment at: lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1595
@@ +1594,3 @@
+/// containing the sign bit if the target has no integer value capable of
+/// holding all bits of the floatingpoint value.
+void SelectionDAGLegalize::getSignAsIntValue(FloatSignAsInt &State,
----------------
floatingpoint -> floating-point

================
Comment at: lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1630
@@ +1629,3 @@
+  } else { // Little endian
+    // The float may be wider than the integer we are going to load.  Advance
+    // the pointer so that the loaded integer will contain the sign bit.
----------------
But the float might also be smaller than the integer, right? Why don't you do an i8 extending load to the legal integer type? I think that would be better.

================
Comment at: lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1649
@@ +1648,3 @@
+/// Replace the integer value produced by getSignAsIntValue() with a new value
+/// and cast the result back to a floatingpoint type.
+SDValue SelectionDAGLegalize::modifySignAsInt(const FloatSignAsInt &State,
----------------
floatingpoint -> floating-point


Repository:
  rL LLVM

http://reviews.llvm.org/D11172







More information about the llvm-commits mailing list