[PATCH] D10867: [Codegen] Added intrinsics 'absdiff' and corresponding SDNodes for absolute difference operation
James Molloy
james.molloy at arm.com
Mon Jul 6 04:11:46 PDT 2015
Apart from the comments I've given, this looks fine by me but please can you get the OK of someone like Hal or Chandler before committing, as this changes LangRef?
================
Comment at: docs/LangRef.rst:9606
@@ +9605,3 @@
+
+ These intrinsics are primarily used during code generation stage of compilation.
+ They are generated by the compiler passes such as Loop/SLP vectorizer.
----------------
Slight re-Englishing: "... used during *the* code generation...", "They are generated by compiler passes such as the Loop and SLP vectorizers."
I'd also suggest adding an explanation of what that means for users, something like "The expectation is that frontends should not need to generate these intrinsics themselves."
================
Comment at: include/llvm/IR/Intrinsics.td:600
@@ +599,3 @@
+def int_sabsdiff : Intrinsic<[llvm_anyvector_ty],
+ [ llvm_anyvector_ty, llvm_anyvector_ty ], [IntrNoMem]>;
+def int_uabsdiff : Intrinsic<[llvm_anyvector_ty],
----------------
These should be "LLVMMatchType<0>", not llvm_anyvector_ty. This enforces all arguments are of the same type as the result.
Repository:
rL LLVM
http://reviews.llvm.org/D10867
More information about the llvm-commits
mailing list