[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
Wed Aug 26 12:09:39 PDT 2015


mzolotukhin added a comment.

Hi Shahid,

Please see my replies below:

Thanks,
Michael


================
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.
 
----------------
ashahid wrote:
> mzolotukhin wrote:
> > 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>)`).
> Thanks for the catch, in this case the behavior is undefined and targets can define their own behavior. Does this make sense?
I think that totally makes sense, but we need to explicitly state that in the documentation.

================
Comment at: test/CodeGen/X86/absdiff_256.ll:1
@@ +1,2 @@
+; RUN: llc < %s -mtriple=x86_64-unknown-unknown  | FileCheck %s -check-prefix=CHECK
+
----------------
`CHECK` is the default prefix, so you don't need to specify it.


http://reviews.llvm.org/D11678





More information about the llvm-commits mailing list