search for: float2int

Displaying 20 results from an estimated 20 matches for "float2int".

2020 Jun 14
0
Prefer SSE and ASM implementation of float2int before lrintf for MSVC patch
...-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.xiph.org/pipermail/opus/attachments/20200614/47918191/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-Prefer-SSE-and-ASM-implementation-of-float2int-befor.patch Type: application/octet-stream Size: 2829 bytes Desc: 0001-Prefer-SSE-and-ASM-implementation-of-float2int-befor.patch URL: <http://lists.xiph.org/pipermail/opus/attachments/20200614/47918191/attachment.obj>
2015 Apr 29
2
[LLVMdev] [RFC][Float2Int] Converting (fcmp Pred, x * F, y) to (ICmp ...)
Hi, I'm trying expand the Float2Int pass in order to make it able to optimize expressions like f * x > y, where x and y are integers (we'll assume unsigned for simplicity) and f is a floating point constant. The optimization would convert the expression to something like: (a * x)/b > y where a and b are intege...
2014 Nov 06
2
[PATCH] float_cast: Fix MSVC ARM build
--- celt/float_cast.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/celt/float_cast.h b/celt/float_cast.h index ede6574..4892e2c 100644 --- a/celt/float_cast.h +++ b/celt/float_cast.h @@ -90,14 +90,14 @@ #include <math.h> #define float2int(x) lrint(x) -#elif (defined(_MSC_VER) && _MSC_VER >= 1400) && (defined (WIN64) || defined (_WIN64)) +#elif (defined(_MSC_VER) && _MSC_VER >= 1400) && (defined (WIN64) || defined (_WIN64)) && !defined(_M_ARM) #include <xmmintrin.h>...
2015 Apr 29
2
[LLVMdev] [RFC][Float2Int] Converting (fcmp Pred, x * F, y) to (ICmp ...)
> On Apr 29, 2015, at 2:33 PM, Matt Arsenault <arsenm2 at gmail.com> wrote: > >> On Apr 29, 2015, at 10:06 AM, Silviu Baranga <Silviu.Baranga at arm.com <mailto:Silviu.Baranga at arm.com>> wrote: >> >> Note that dividing by an integer constant should be a cheap operation >> compared to FP multiplication and comparison as this would get lowered to a
2014 Nov 06
2
[PATCH] float_cast: Fix MSVC ARM build
...file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/celt/float_cast.h b/celt/float_cast.h >> index ede6574..4892e2c 100644 >> --- a/celt/float_cast.h >> +++ b/celt/float_cast.h >> @@ -90,14 +90,14 @@ >> #include <math.h> >> #define float2int(x) lrint(x) >> >> -#elif (defined(_MSC_VER) && _MSC_VER >= 1400) && (defined (WIN64) || >> defined (_WIN64)) >> +#elif (defined(_MSC_VER) && _MSC_VER >= 1400) && (defined (WIN64) || >> defined (_WIN64)) && !defined(_M_ARM)...
2010 Oct 16
1
WIN64 issue
...ne assembly language (and *still* doesn't have "lrintf"), I suggest the following change to use intrinsics for the 64-bit compiler: --- float_cast.h Sat Oct 17 19:51:32 2009 +++ new\float_cast.h Fri Oct 15 12:09:38 2010 @@ -72,8 +72,14 @@ #include <math.h> #define float2int(x) lrint(x) -#elif (defined (WIN32) || defined (_WIN32)) +#elif (defined (WIN64) || defined (_WIN64)) + #include <xmmintrin.h> + __inline long int float2int(float value) + { + return _mm_cvtss_si32(_mm_load_ss(&value)); + } +#elif (defined (WIN32) || defined (_WIN32))...
2014 Nov 06
2
[PATCH] float_cast: Fix MSVC ARM build
...t;>> diff --git a/celt/float_cast.h b/celt/float_cast.h > >>> index ede6574..4892e2c 100644 > >>> --- a/celt/float_cast.h > >>> +++ b/celt/float_cast.h > >>> @@ -90,14 +90,14 @@ > >>> #include <math.h> > >>> #define float2int(x) lrint(x) > >>> > >>> -#elif (defined(_MSC_VER) && _MSC_VER >= 1400) && (defined (WIN64) || > >>> defined (_WIN64)) > >>> +#elif (defined(_MSC_VER) && _MSC_VER >= 1400) && (defined (WIN64) || > >>> d...
2014 Nov 07
0
opus Digest, Vol 70, Issue 3
...git-send-email-hugo at beauzee.fr> --- celt/float_cast.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/celt/float_cast.h b/celt/float_cast.h index ede6574..4892e2c 100644 --- a/celt/float_cast.h +++ b/celt/float_cast.h @@ -90,14 +90,14 @@ #include <math.h> #define float2int(x) lrint(x) -#elif (defined(_MSC_VER) && _MSC_VER >= 1400) && (defined (WIN64) || defined (_WIN64)) +#elif (defined(_MSC_VER) && _MSC_VER >= 1400) && (defined (WIN64) || defined (_WIN64)) && !defined(_M_ARM) #include <xmmintrin.h>...
2014 Nov 06
0
[PATCH] float_cast: Fix MSVC ARM build
...elt/float_cast.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/celt/float_cast.h b/celt/float_cast.h > index ede6574..4892e2c 100644 > --- a/celt/float_cast.h > +++ b/celt/float_cast.h > @@ -90,14 +90,14 @@ > #include <math.h> > #define float2int(x) lrint(x) > > -#elif (defined(_MSC_VER) && _MSC_VER >= 1400) && (defined (WIN64) || defined (_WIN64)) > +#elif (defined(_MSC_VER) && _MSC_VER >= 1400) && (defined (WIN64) || defined (_WIN64)) && !defined(_M_ARM) > #include <xmmi...
2014 Nov 06
0
[PATCH] float_cast: Fix MSVC ARM build
...2 deletions(-) >>> >>> diff --git a/celt/float_cast.h b/celt/float_cast.h >>> index ede6574..4892e2c 100644 >>> --- a/celt/float_cast.h >>> +++ b/celt/float_cast.h >>> @@ -90,14 +90,14 @@ >>> #include <math.h> >>> #define float2int(x) lrint(x) >>> >>> -#elif (defined(_MSC_VER) && _MSC_VER >= 1400) && (defined (WIN64) || >>> defined (_WIN64)) >>> +#elif (defined(_MSC_VER) && _MSC_VER >= 1400) && (defined (WIN64) || >>> defined (_WIN64)) &&am...
2014 Nov 06
0
[PATCH] float_cast: Fix MSVC ARM build
...celt/float_cast.h b/celt/float_cast.h > >>> index ede6574..4892e2c 100644 > >>> --- a/celt/float_cast.h > >>> +++ b/celt/float_cast.h > >>> @@ -90,14 +90,14 @@ > >>> #include <math.h> > >>> #define float2int(x) lrint(x) > >>> > >>> -#elif (defined(_MSC_VER) && _MSC_VER >= 1400) && (defined > (WIN64) || > >>> defined (_WIN64)) > >>> +#elif (defined(_MSC_VER) && _MSC_VER >= 1400) && (defined >...
2016 May 09
2
Some questions about phase ordering in OPT and LLC
...dvars -loop-idiom -loop-deletion -loop-unroll -mldst-motion -domtree -memdep -gvn -memdep -memcpyopt -sccp -domtree -bdce -instcombine -lazy-value-info -jump-threading -correlated-propagation -domtree -memdep -dse -loops -loop-simplify -lcssa -licm -adce -simplifycfg -domtree -instcombine -barrier -float2int -domtree -loops -loop-simplify -lcssa -loop-rotate -branch-prob -block-freq -scalar-evolution -loop-accesses -loop-vectorize -instcombine -scalar-evolution -slp-vectorizer -simplifycfg -domtree -instcombine -loops -loop-simplify -lcssa -scalar-evolution -loop-unroll -instcombine -loop-simplify -lcs...
2016 May 09
4
Some questions about phase ordering in OPT and LLC
...-loop-idiom -loop-deletion -loop-unroll -mldst-motion -domtree -memdep -gvn -memdep -memcpyopt -sccp -domtree -bdce -instcombine -lazy-value-info -jump-threading -correlated-propagation -domtree -memdep -dse -loops -loop-simplify -lcssa -licm -adce -simplifycfg -domtree -instcombine -barrier -float2int -domtree -loops -loop-simplify -lcssa -loop-rotate -branch-prob -block-freq -scalar-evolution -loop-accesses -loop-vectorize -instcombine -scalar-evolution -slp-vectorizer -simplifycfg -domtree -instcombine -loops -loop-simplify -lcssa -scalar-evolution -loop-unroll -instcombine -loop-simplify...
2018 Nov 05
3
Safe fptoui/fptosi casts
...value is poison. (Alternatively the meaning of the flag could be inverted.) >From a cursory inspection of the code, there should not be too many places that care about the presence of this flag. The main one is of course constant folding, but there are probably others (I could imagine that the Float2Int pass makes assumptions here, but haven't looked too carefully.) Point 2 is also important, because specifying saturation as the default behavior for float-to-int casts is becoming increasingly common. This would need two new intrinsics, such as: iYY llvm.fptoui.sat.fXX.iYY(fXX %a) iYY llvm.fp...
2015 Mar 21
0
use xmm intrinsics for lrintf() with mingw-w64
...cast.h b/celt/float_cast.h index ed5a39b..b9b8484 100644 --- a/celt/float_cast.h +++ b/celt/float_cast.h @@ -61,7 +61,14 @@ ** the config.h file. */ -#if (HAVE_LRINTF) +#if (defined(__GNUC__) && defined(_WIN64)) + #include <xmmintrin.h> + static __inline long int float2int(float value) + { + return _mm_cvtss_si32(_mm_load_ss(&value)); + } + +#elif (HAVE_LRINTF) /* These defines enable functionality introduced with the 1999 ISO C ** standard. They must be defined before the inclusion of math.h to index 1441b97..29f185b 1...
2018 Nov 05
5
Safe fptoui/fptosi casts
...lternatively the meaning of the flag could be inverted.) > > From a cursory inspection of the code, there should not be too many places > that care about the presence of this flag. The main one is of course > constant folding, but there are probably others (I could imagine that the > Float2Int pass makes assumptions here, but haven't looked too carefully.) > > Point 2 is also important, because specifying saturation as the default > behavior for float-to-int casts is becoming increasingly common. This would > need two new intrinsics, such as: > > iYY llvm.fptoui.sat...
2018 Jun 30
4
Determine reason for failure at -O1
Hi Everyone, We caught a report for a failed self test when using Clang 5.0 and 6.0 with -DDEBUG and -O1 (i.e., a "debug build"). The code is question is located at https://github.com/weidai11/cryptopp/blob/master/cham-simd.cpp . It is the SSSE3 code path for CHAM64. Other optimizations levels are OK for Clang. GCC, ICC and MSVC are OK. The code is valgrind, Sanitizer, Coverity and
2015 May 02
5
[LLVMdev] Modifying LoopUnrollingPass
Hi Zhoulai, I am trying to modify "LoopUnrollPass" in llvm which produces multiple copies of loop equal to the loop unroll factor.Currently, using multicore architecture, say 3 for example and the execution goes like: for 3 cores if there are 9 iterations of loop core instruction 1 0,3,6 2 1,4,7 3 2,5,8 But I want to to
2015 May 04
2
[LLVMdev] Modifying LoopUnrollingPass
...tion -loop-unroll > -memdep -mldst-motion -domtree -memdep -gvn -memdep -memcpyopt -sccp > -domtree -bdce -instcombine -lazy-value-info -jump-threading > -correlated-propagation -domtree -memdep -dse -loops -loop-simplify -lcssa > -licm -adce -simplifycfg -domtree -instcombine -barrier -float2int -domtree > -loops -loop-simplify -lcssa -loop-rotate -branch-prob -block-freq > -scalar-evolution -loop-accesses -loop-vectorize -instcombine > -scalar-evolution -slp-vectorizer -simplifycfg -domtree -instcombine -loops > -loop-simplify -lcssa -scalar-evolution -loop-unroll -instsimplif...
2015 Jul 29
1
[LLVMdev] Error when i am using command make -j4 command in cygwin to compile safecode
...erts build llvm[3]: Compiling FlattenCFGPass.cpp for Release+Asserts build llvm[3]: Compiling StatepointLowering.cpp for Release+Asserts build llvm[2]: Compiling ScalarEvolutionExpander.cpp for Release+Asserts build llvm[3]: Compiling X86ISelLowering.cpp for Release+Asserts build llvm[3]: Compiling Float2Int.cpp for Release+Asserts build llvm[3]: Compiling TargetLowering.cpp for Release+Asserts build llvm[3]: Compiling GVN.cpp for Release+Asserts build llvm[2]: Compiling ScalarEvolutionNormalization.cpp for Release+Asserts build llvm[2]: Compiling ScopedNoAliasAA.cpp for Release+Asserts build llvm[2]:...