[PATCH] D11678: [CodeGen] Fixes *absdiff* intrinsic: LangRef doc/test case improvement and corresponding code change

Michael Zolotukhin via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 25 10:10:08 PDT 2015


mzolotukhin added a comment.

Hi Shahid,

Thanks for working on this! Please find some questions/comments below:


================
Comment at: docs/LangRef.rst:10750-10751
@@ -10747,4 +10749,4 @@
 
 The ``llvm.sabsdiff`` intrinsic returns a vector result of the absolute difference of
 the two operands, treating them both as signed integers.
 
----------------
Please specify what happens if the result overflows (e.g. `llvm.sabsdiff.v4i8(<4 x i32> <-128, -128, -128, -128>, <4 x i32> <127, 127, 127, 127>)`).

================
Comment at: docs/LangRef.rst:10756
@@ -10753,3 +10755,3 @@
     These intrinsics are primarily used during the code generation stage of compilation.
     They are generated by compiler passes such as the Loop and SLP vectorizers.it is not
     recommended for users to create them manually.
----------------
While we are here, could you please fix the typo here? (space before 'it' and capitalize the first letter)

================
Comment at: test/CodeGen/X86/absdiff_256.ll:9
@@ +8,3 @@
+; CHECK:             pxor
+; CHECK-DAG:         pxor    {{%xmm[0-9]+}}, [[DST:%xmm[0-9]+]]
+; CHECK:             pcmpgtd [[SRC]], [[DST]]
----------------
A single `CHECK-DAG` between two `CHECK` statements has no effect (it works as a plain `CHECK`). Please fix that.


http://reviews.llvm.org/D11678





More information about the llvm-commits mailing list