diff mbox

ptx preliminary address space fixes [4/4]

Message ID 5419EBD2.6080606@codesourcery.com
State New
Headers show

Commit Message

Bernd Schmidt Sept. 17, 2014, 8:15 p.m. UTC
On 09/11/2014 01:41 PM, Richard Biener wrote:
> On Thu, Sep 11, 2014 at 12:12 PM, Bernd Schmidt <bernds@codesourcery.com> wrote:
>> This one isn't a wrong-code issue, just a missed optimization.  The strlen
>> optimizations need to be made to look through ADDR_SPACE_CONVERT_EXPR to
>> work on ptx.
>>
>> Bootstrapped and tested together with the other patches on x86_64-linux.
>> Ok?
>
> Did you try adding ADDR_SPACE_CONVERT_EXPR to the tree codes
> handled in gimple_assign_cast_p?

I did now (full test on x86_64, and also tested with ptx), and that also 
appears to work.  Ok?


Bernd

Comments

Richard Biener Sept. 22, 2014, 8:49 a.m. UTC | #1
On Wed, Sep 17, 2014 at 10:15 PM, Bernd Schmidt <bernds@codesourcery.com> wrote:
> On 09/11/2014 01:41 PM, Richard Biener wrote:
>>
>> On Thu, Sep 11, 2014 at 12:12 PM, Bernd Schmidt <bernds@codesourcery.com>
>> wrote:
>>>
>>> This one isn't a wrong-code issue, just a missed optimization.  The
>>> strlen
>>> optimizations need to be made to look through ADDR_SPACE_CONVERT_EXPR to
>>> work on ptx.
>>>
>>> Bootstrapped and tested together with the other patches on x86_64-linux.
>>> Ok?
>>
>>
>> Did you try adding ADDR_SPACE_CONVERT_EXPR to the tree codes
>> handled in gimple_assign_cast_p?
>
>
> I did now (full test on x86_64, and also tested with ptx), and that also
> appears to work.  Ok?

Ok.

Thanks,
Richard.

>
> Bernd
>
diff mbox

Patch

diff --git a/gcc/gimple.h b/gcc/gimple.h
index ec41585..8d4032b 100644
--- a/gcc/gimple.h
+++ b/gcc/gimple.h
@@ -2384,9 +2384,10 @@  gimple_assign_cast_p (const_gimple s)
   if (is_gimple_assign (s))
     {
       enum tree_code sc = gimple_assign_rhs_code (s);
-      return CONVERT_EXPR_CODE_P (sc)
-	     || sc == VIEW_CONVERT_EXPR
-	     || sc == FIX_TRUNC_EXPR;
+      return (CONVERT_EXPR_CODE_P (sc)
+	      || sc == VIEW_CONVERT_EXPR
+	      || sc == FIX_TRUNC_EXPR
+	      || sc == ADDR_SPACE_CONVERT_EXPR);
     }
 
   return false;