search for: ssat

Displaying 17 results from an estimated 17 matches for "ssat".

Did you mean: sat
2015 Jan 14
5
[LLVMdev] [RFC] Integer Saturation Intrinsics
Hi all, The patches linked below introduce a new family of intrinsics, for integer saturation: @llvm.usat, and @llvm.ssat (unsigned/signed). Quoting the added documentation: %r = call i32 @llvm.ssat.i32(i32 %x, i32 %n) is equivalent to the expression min(max(x, -2^(n-1)), 2^(n-1)-1), itself implementable as the following IR: %min_sint_n = i32 ... ; the min. signed integer of bitwidth n, -2^(n-1) %...
2011 Jun 18
0
[LLVMdev] RFC: Integer saturation intrinsics
> The plan is to form calls to these intrinsics in InstCombine. Legalizer > can expand these intrinsics if they are not legal. The expansion should > be fairly straight forward and produce code that is at least as good as > what LLVM is currently generating for these code sequence. SSAT/USAT may set the Q (saturation) flag, which might cause problems for anyone relying on explicitly using saturating operations (QADD etc.) and testing the Q flag. So there are several possibilities: - you could do liveness analysis on Q and only introduce SSAT/USAT if Q is not live - you cou...
2011 Jun 17
5
[LLVMdev] RFC: Integer saturation intrinsics
Hi all, I'm proposing integer saturation intrinsics. def int_ssat : Intrinsic<[llvm_anyint_ty], [LLVMMatchType<0>, llvm_i32_ty]>; def int_usat : Intrinsic<[llvm_anyint_ty], [LLVMMatchType<0>, llvm_i32_ty]>; The first operand is the integer value being saturated, and second is the saturation bit position. For scalar integer types, the sem...
2011 Jun 17
0
[LLVMdev] RFC: Integer saturation intrinsics
...om> wrote: > > On Jun 17, 2011, at 3:42 PM, Eli Friedman wrote: > >> On Fri, Jun 17, 2011 at 3:08 PM, Evan Cheng <evan.cheng at apple.com> wrote: >>> Hi all, >>> >>> I'm proposing integer saturation intrinsics. >>> >>> def int_ssat : Intrinsic<[llvm_anyint_ty], [LLVMMatchType<0>, llvm_i32_ty]>; >>> def int_usat : Intrinsic<[llvm_anyint_ty], [LLVMMatchType<0>, llvm_i32_ty]>; >>> >>> The first operand is the integer value being saturated, and second is the saturation bit positi...
2011 Jun 17
2
[LLVMdev] RFC: Integer saturation intrinsics
On Jun 17, 2011, at 3:42 PM, Eli Friedman wrote: > On Fri, Jun 17, 2011 at 3:08 PM, Evan Cheng <evan.cheng at apple.com> wrote: >> Hi all, >> >> I'm proposing integer saturation intrinsics. >> >> def int_ssat : Intrinsic<[llvm_anyint_ty], [LLVMMatchType<0>, llvm_i32_ty]>; >> def int_usat : Intrinsic<[llvm_anyint_ty], [LLVMMatchType<0>, llvm_i32_ty]>; >> >> The first operand is the integer value being saturated, and second is the saturation bit position. >&gt...
2015 Jan 15
2
[LLVMdev] [RFC] Integer Saturation Intrinsics
...pecific part in mind? Anyway, thanks for the feedback! -Ahmed > Philip > > > On 01/14/2015 02:08 PM, Ahmed Bougacha wrote: >> >> Hi all, >> >> The patches linked below introduce a new family of intrinsics, for >> integer saturation: @llvm.usat, and @llvm.ssat (unsigned/signed). >> Quoting the added documentation: >> >> %r = call i32 @llvm.ssat.i32(i32 %x, i32 %n) >> >> is equivalent to the expression min(max(x, -2^(n-1)), 2^(n-1)-1), itself >> implementable as the following IR: >> >> %min_sin...
2011 Jun 18
2
[LLVMdev] RFC: Integer saturation intrinsics
...>>>> >>>> Comments? >>> >>> Is there some reason why pattern-matching this in an ARM-specific >>> DAGCombine doesn't work? >> >> It's not possible to look beyond a single BB at isel time. > > Anything that we can match to ssat should be of the form max(min(x, > SATMAX), SATMIN) (where max and min are icmp+select pairs).  If the > min and max aren't in the same block, and we don't have an IR > transformation to put them in the same block, we should fix that > rather than introducing an instrinsic for t...
2015 Jan 15
3
[LLVMdev] [RFC] Integer Saturation Intrinsics
...timisations. > > David > > > On 14 Jan 2015, at 22:08, Ahmed Bougacha <ahmed.bougacha at gmail.com> > wrote: > > > > Hi all, > > > > The patches linked below introduce a new family of intrinsics, for > > integer saturation: @llvm.usat, and @llvm.ssat (unsigned/signed). > > Quoting the added documentation: > > > > %r = call i32 @llvm.ssat.i32(i32 %x, i32 %n) > > > > is equivalent to the expression min(max(x, -2^(n-1)), 2^(n-1)-1), itself > > implementable as the following IR: > > > > %min...
2015 Jan 15
0
[LLVMdev] [RFC] Integer Saturation Intrinsics
...s for the feedback! > > -Ahmed > >> Philip >> >> >> On 01/14/2015 02:08 PM, Ahmed Bougacha wrote: >>> Hi all, >>> >>> The patches linked below introduce a new family of intrinsics, for >>> integer saturation: @llvm.usat, and @llvm.ssat (unsigned/signed). >>> Quoting the added documentation: >>> >>> %r = call i32 @llvm.ssat.i32(i32 %x, i32 %n) >>> >>> is equivalent to the expression min(max(x, -2^(n-1)), 2^(n-1)-1), itself >>> implementable as the following IR: >>...
2011 Jun 17
0
[LLVMdev] RFC: Integer saturation intrinsics
On Fri, Jun 17, 2011 at 3:08 PM, Evan Cheng <evan.cheng at apple.com> wrote: > Hi all, > > I'm proposing integer saturation intrinsics. > > def int_ssat : Intrinsic<[llvm_anyint_ty], [LLVMMatchType<0>, llvm_i32_ty]>; > def int_usat : Intrinsic<[llvm_anyint_ty], [LLVMMatchType<0>, llvm_i32_ty]>; > > The first operand is the integer value being saturated, and second is the saturation bit position. > > For scalar...
2011 Jun 19
0
[LLVMdev] RFC: Integer saturation intrinsics
...gt; Comments? >>>> >>>> Is there some reason why pattern-matching this in an ARM-specific >>>> DAGCombine doesn't work? >>> >>> It's not possible to look beyond a single BB at isel time. >> >> Anything that we can match to ssat should be of the form max(min(x, >> SATMAX), SATMIN) (where max and min are icmp+select pairs). If the >> min and max aren't in the same block, and we don't have an IR >> transformation to put them in the same block, we should fix that >> rather than introducing an...
2011 Jun 19
1
[LLVMdev] RFC: Integer saturation intrinsics
...;>> >>>>> Is there some reason why pattern-matching this in an ARM-specific >>>>> DAGCombine doesn't work? >>>> >>>> It's not possible to look beyond a single BB at isel time. >>> >>> Anything that we can match to ssat should be of the form max(min(x, >>> SATMAX), SATMIN) (where max and min are icmp+select pairs).  If the >>> min and max aren't in the same block, and we don't have an IR >>> transformation to put them in the same block, we should fix that >>> rather than...
2018 Aug 22
2
Fixed Point Support in LLVM
...et would only be able to handle a handful of value combinations to this anyway. IMHO it should be a number of separate intrinsics with well-defined semantics for each one, preferably semantics that can be described in a single line. That makes it easy to implement and understand. Like so: llvm.ssat.iN(iN A, i32 SatWidth) = saturate anything above SatWidth bits as a signed value llvm.usat.iN(iN B, i32 SatWidth) = saturate anything above SatWidth bits as an unsigned value llvm.fixsmul.iN(iN A, iN B, i32 Scale) = sext->mul->ashr->trunc llvm.fixumul.iN(iN A, iN B, i32 Scale) = zext-&gt...
2011 Sep 01
0
[PATCH 5/5] resample: Add NEON optimized inner_product_single for floating point
...ibspeex/resample_neon.h index ba93e41..e7e981e 100644 --- a/libspeex/resample_neon.h +++ b/libspeex/resample_neon.h @@ -39,6 +39,30 @@ #include <arm_neon.h> #ifdef FIXED_POINT +#ifdef __thumb2__ +static inline int32_t saturate_32bit_to_16bit(int32_t a) { + int32_t ret; + asm ("ssat %[ret], #16, %[a]" + : [ret] "=&r" (ret) + : [a] "r" (a) + : ); + return ret; +} +#else +static inline int32_t saturate_32bit_to_16bit(int32_t a) { + int32_t ret; + asm ("vmov.s32 d0[0], %[a]\n" + "vqmovn.s32 d0, q...
2012 Aug 11
2
Extending Puppet Woes
.... Can someone help me understand how the mysql is being executed with mysql? debug: Puppet::Type::Database::ProviderMysql: Executing ''/usr/bin/mysql -u admin -p''password'' -h vm-minux.comm.com -NBev create database mydb character set utf8'' err: /Stage[main]//Node[ssat-puppetagent-1.qcomm.com]/Test_mod::Db[mydb]/Database[mydb]/ensure: change from absent to present failed: Execution of ''/usr/bin/mysql -u admin -p''password'' -h vm-mlinux.qcomm.com -NBev create database mydb character set utf8'' returned 1: ERROR 1044 (42000): Acce...
2018 Aug 22
2
Fixed Point Support in LLVM
On 2018-08-22 05:56, John McCall via llvm-dev wrote: >> On Aug 21, 2018, at 6:20 PM, Leonard Chan <leonardchan at google.com> wrote: >> If we were to create a new type down the line, I think the main >> features that would distinguish them from other types are the >> arbitrary width and scale. Saturation can be handled through >> instructions since saturation
2011 Sep 01
6
[PATCH 0/5] ARM NEON optimization for samplerate converter
From: Jyri Sarha <jsarha at ti.com> I optimized Speex resampler for NEON capable ARM CPUs. The first patch should speed up resampling on any platform that can spare the increased memory usage. It would be nice to have these merged to the master branch. Please let me know if there is anything I can do to help the the merge. The patches have been rebased on top of master branch in