[PATCH] D10964: [Codegen] Add intrinsics 'hsum*' and corresponding SDNodes for horizontal sum operation.
Bruno Cardoso Lopes via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 13 12:40:53 PDT 2015
bruno added inline comments.
================
Comment at: include/llvm/CodeGen/ISDOpcodes.h:346
@@ +345,3 @@
+ /// HSUM/FHSUM(VEC) - Horizontal sum across the elements of sole integer
+ /// or float input vector.Returns a vector, of the same type as VEC.
+ /// These nodes are generated from llvm.hsum* intrinsics.The scalar result
----------------
Space after the dot.
================
Comment at: include/llvm/CodeGen/ISDOpcodes.h:347
@@ +346,3 @@
+ /// or float input vector.Returns a vector, of the same type as VEC.
+ /// These nodes are generated from llvm.hsum* intrinsics.The scalar result
+ /// of the intrinsic is stored in first element of a vector of type VEC.
----------------
Same here.
================
Comment at: lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp:1057
@@ +1056,3 @@
+ assert(DAG.getTarget().Options.UnsafeFPMath &&
+ "Floating point horizontal sum only supported for fast-math");
+ SDLoc dl(Op);
----------------
Using the assert inside this "if" will be a problem when asserts aren't enabled.
================
Comment at: test/CodeGen/X86/vec-hadd-float-128.ll:1
@@ +1,2 @@
+; RUN: llc < %s -mtriple=x86_64-unknown-unknown -enable-unsafe-fp-math | FileCheck --check-prefix=UNSAFE %s
+
----------------
Thanks for updating the tests. Could you please use ./utils/update_llc_test_checks.py to rewrite the tests checking? This will make it easier later on to see the improvements from target customization or widening (as you mentioned in a TODO).
http://reviews.llvm.org/D10964
More information about the llvm-commits
mailing list