[PATCH] D49239: [ARM] SADD16 support in ParallelDSP

John Brawn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 24 10:01:24 PDT 2018


john.brawn added a comment.

In https://reviews.llvm.org/D49239#1173293, @samparker wrote:

> Is it such a bad idea? Sure, I would like to check whether the sel intrinsic has been used or not, but what happens in the case of inline assembly? The AAPCS is also vague, I'm not sure what a 'public interface' is in terms of an LLVM module. I'd like to have an option which is the user can be explicit in saying its fine to use these instructions.


'public interface' means 'function' when it comes to C/C++. The ACLE document is says a bit more (https://developer.arm.com/products/software-development-tools/compilers/arm-compiler-5/docs/101028/latest/8-data-processing-intrinsics) but essentially it's perfectly possible to write

  #include <arm_acle.h>
  
  uint8x4_t fn(uint8x4_t x, uint8x4_t y) {
    __usub8(x,y); // sets ge flags
  
    // code here that ARMParallelDSP could possibly optimise
  
    return __sel(x, y);
  }

and, so long as there are no function calls between the usub8 and the sel, the compiler must preserve the ge bits produced by the usub8 so that the sel can use them.


https://reviews.llvm.org/D49239





More information about the llvm-commits mailing list