[PATCH] D10964: [Codegen] Add intrinsics 'hsum*' and corresponding SDNodes for horizontal sum operation.
hfinkel@anl.gov via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 2 10:02:01 PDT 2015
hfinkel added a comment.
Please upload future patches will full context, see: http://llvm.org/docs/Phabricator.html#requesting-a-review-via-the-web-interface for instructions.
================
Comment at: docs/LangRef.rst:10794
@@ +10793,3 @@
+This is an overloaded intrinsic. The loaded data is a vector of any integer or floating point data type.
+Floating point data type is only supported in fast-math mode.
+
----------------
This constraint is not acceptable, you'll need to remove it. (plus, we're moving to a model where fast-math semantics are per-instruction flags). However, it is perfectly reasonable to document the fact that the ordering of the additions performed with the intrinsic is undefined.
================
Comment at: lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp:1058
@@ +1057,3 @@
+ bool isExpand = true;
+ if (Op->getOpcode() == ISD::FHSUM && !DAG.getTarget().Options.UnsafeFPMath)
+ isExpand = false;
----------------
Remove the UnsafeFPMath check.
================
Comment at: lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp:2928
@@ +2927,3 @@
+ bool isExpand = true;
+ if (N->getOpcode() == ISD::FHSUM && !DAG.getTarget().Options.UnsafeFPMath)
+ isExpand = false;
----------------
Remove the UnsafeFPMath check.
http://reviews.llvm.org/D10964
More information about the llvm-commits
mailing list