backend: refine global immediate optimization

Submitted by rander on June 30, 2017, 8:28 a.m.

Details

Message ID 1498811338-11368-1-git-send-email-rander.wang@intel.com
State New
Headers show
Series "backend: refine global immediate optimization" ( rev: 1 ) in Beignet

Not browsing as part of any series.

Commit Message

rander June 30, 2017, 8:28 a.m.
for ABS(UD) = UD on Gen, so delete it,
	or it make compilation failed on some platform

Signed-off-by: rander.wang <rander.wang@intel.com>
---
 backend/src/backend/gen_insn_selection_optimize.cpp | 4 ----
 1 file changed, 4 deletions(-)

Patch hide | download patch | download mbox

diff --git a/backend/src/backend/gen_insn_selection_optimize.cpp b/backend/src/backend/gen_insn_selection_optimize.cpp
index eb93a20..08e4ccf 100644
--- a/backend/src/backend/gen_insn_selection_optimize.cpp
+++ b/backend/src/backend/gen_insn_selection_optimize.cpp
@@ -424,14 +424,10 @@  namespace gbe
             else if(src0.type == GEN_TYPE_UD || src1.type == GEN_TYPE_UD)
             {
               unsigned int s0 = src0.value.ud;
-              if (src0.absolute)
-                s0 = abs(s0);
               if (src0.negation)
                 s0 = -s0;
 
               unsigned int s1 = src1.value.ud;
-              if (src1.absolute)
-                s1 = abs(s1);
               if (src1.negation)
                 s1 = -s1;
 

Comments

Hi Yang Rong,

Please help merge this patch. These lines of code cause build error. And in fact they are not needed.

Hi Yichao,

Sorry for this. In fact these two lines of code should be removed.

Thanks!
Ruiling

> -----Original Message-----

> From: Beignet [mailto:beignet-bounces@lists.freedesktop.org] On Behalf Of

> rander.wang

> Sent: Friday, June 30, 2017 4:29 PM

> To: beignet@freedesktop.org

> Cc: Wang, Rander <rander.wang@intel.com>

> Subject: [Beignet] [PATCH] backend: refine global immediate optimization

> 

> 	for ABS(UD) = UD on Gen, so delete it,

> 	or it make compilation failed on some platform

> 

> Signed-off-by: rander.wang <rander.wang@intel.com>

> ---

>  backend/src/backend/gen_insn_selection_optimize.cpp | 4 ----

>  1 file changed, 4 deletions(-)

> 

> diff --git a/backend/src/backend/gen_insn_selection_optimize.cpp

> b/backend/src/backend/gen_insn_selection_optimize.cpp

> index eb93a20..08e4ccf 100644

> --- a/backend/src/backend/gen_insn_selection_optimize.cpp

> +++ b/backend/src/backend/gen_insn_selection_optimize.cpp

> @@ -424,14 +424,10 @@ namespace gbe

>              else if(src0.type == GEN_TYPE_UD || src1.type == GEN_TYPE_UD)

>              {

>                unsigned int s0 = src0.value.ud;

> -              if (src0.absolute)

> -                s0 = abs(s0);

>                if (src0.negation)

>                  s0 = -s0;

> 

>                unsigned int s1 = src1.value.ud;

> -              if (src1.absolute)

> -                s1 = abs(s1);

>                if (src1.negation)

>                  s1 = -s1;

> 

> --

> 2.7.4

> 

> _______________________________________________

> Beignet mailing list

> Beignet@lists.freedesktop.org

> https://lists.freedesktop.org/mailman/listinfo/beignet
Forgot to push this patch, pushed, thanks.

> -----Original Message-----

> From: Song, Ruiling

> Sent: Thursday, July 20, 2017 9:13

> To: Wang, Rander <rander.wang@intel.com>; beignet@freedesktop.org

> Cc: Wang, Rander <rander.wang@intel.com>; Yichao Yu

> <yyc1992@gmail.com>; Yang, Rong R <rong.r.yang@intel.com>

> Subject: RE: [Beignet] [PATCH] backend: refine global immediate

> optimization

> 

> Hi Yang Rong,

> 

> Please help merge this patch. These lines of code cause build error. And in

> fact they are not needed.

> 

> Hi Yichao,

> 

> Sorry for this. In fact these two lines of code should be removed.

> 

> Thanks!

> Ruiling

> 

> > -----Original Message-----

> > From: Beignet [mailto:beignet-bounces@lists.freedesktop.org] On Behalf

> > Of rander.wang

> > Sent: Friday, June 30, 2017 4:29 PM

> > To: beignet@freedesktop.org

> > Cc: Wang, Rander <rander.wang@intel.com>

> > Subject: [Beignet] [PATCH] backend: refine global immediate

> > optimization

> >

> > 	for ABS(UD) = UD on Gen, so delete it,

> > 	or it make compilation failed on some platform

> >

> > Signed-off-by: rander.wang <rander.wang@intel.com>

> > ---

> >  backend/src/backend/gen_insn_selection_optimize.cpp | 4 ----

> >  1 file changed, 4 deletions(-)

> >

> > diff --git a/backend/src/backend/gen_insn_selection_optimize.cpp

> > b/backend/src/backend/gen_insn_selection_optimize.cpp

> > index eb93a20..08e4ccf 100644

> > --- a/backend/src/backend/gen_insn_selection_optimize.cpp

> > +++ b/backend/src/backend/gen_insn_selection_optimize.cpp

> > @@ -424,14 +424,10 @@ namespace gbe

> >              else if(src0.type == GEN_TYPE_UD || src1.type == GEN_TYPE_UD)

> >              {

> >                unsigned int s0 = src0.value.ud;

> > -              if (src0.absolute)

> > -                s0 = abs(s0);

> >                if (src0.negation)

> >                  s0 = -s0;

> >

> >                unsigned int s1 = src1.value.ud;

> > -              if (src1.absolute)

> > -                s1 = abs(s1);

> >                if (src1.negation)

> >                  s1 = -s1;

> >

> > --

> > 2.7.4

> >

> > _______________________________________________

> > Beignet mailing list

> > Beignet@lists.freedesktop.org

> > https://lists.freedesktop.org/mailman/listinfo/beignet