public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH, ARM] Fix for pr65924
@ 2015-04-29  9:02 Yvan Roux
  2015-04-29 10:26 ` Kyrill Tkachov
  0 siblings, 1 reply; 4+ messages in thread
From: Yvan Roux @ 2015-04-29  9:02 UTC (permalink / raw)
  To: gcc-patches, Kyrylo Tkachov

[-- Attachment #1: Type: text/plain, Size: 405 bytes --]

Hi,

here is the patch for PR65924, only tested on the original testcase so far.

Thanks
Yvan

gcc/
2015-04-29  Yvan Roux  <yvan.roux@linaro.org>

    PR target/65924
    * config/arm/thumb2.md (*thumb2_addsi3_compare0_scratch): Fix operand
    number in type attribute expression.

gcc/testsuite/
2015-04-29  Yvan Roux  <yvan.roux@linaro.org>

    PR target/65924
    gcc.target/arm/pr65924.c: New test.

[-- Attachment #2: pr65924.diff --]
[-- Type: text/plain, Size: 867 bytes --]

diff --git a/gcc/config/arm/thumb2.md b/gcc/config/arm/thumb2.md
index 4f9faac..2c91542 100644
--- a/gcc/config/arm/thumb2.md
+++ b/gcc/config/arm/thumb2.md
@@ -1305,7 +1305,7 @@
   "
   [(set_attr "conds" "set")
    (set_attr "length" "2,4")
-   (set (attr "type") (if_then_else (match_operand 2 "const_int_operand" "")
+   (set (attr "type") (if_then_else (match_operand 1 "const_int_operand" "")
                                     (const_string "alus_imm")
                                     (const_string "alus_sreg")))]
 )
diff --git a/gcc/testsuite/gcc.target/arm/pr65924.c b/gcc/testsuite/gcc.target/arm/pr65924.c
new file mode 100644
index 0000000..746749f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/pr65924.c
@@ -0,0 +1,8 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mthumb" } */
+
+int a, b, c;
+int fn1() {
+  if (b + a < 0)
+    c = 0;
+}

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH, ARM] Fix for pr65924
  2015-04-29  9:02 [PATCH, ARM] Fix for pr65924 Yvan Roux
@ 2015-04-29 10:26 ` Kyrill Tkachov
  2015-04-29 10:57   ` Yvan Roux
  0 siblings, 1 reply; 4+ messages in thread
From: Kyrill Tkachov @ 2015-04-29 10:26 UTC (permalink / raw)
  To: Yvan Roux, gcc-patches

Hi Yvan,

On 29/04/15 09:57, Yvan Roux wrote:
> Hi,
>
> here is the patch for PR65924, only tested on the original testcase so far.

Can you please double check that the problem doesn't appear
in the other patterns you touched with your cleanup patch?
i.e. that you don't do match_operand on an out-of-bounds operand number?

Thanks,
Kyrill

>
> Thanks
> Yvan
>
> gcc/
> 2015-04-29  Yvan Roux  <yvan.roux@linaro.org>
>
>      PR target/65924
>      * config/arm/thumb2.md (*thumb2_addsi3_compare0_scratch): Fix operand
>      number in type attribute expression.
>
> gcc/testsuite/
> 2015-04-29  Yvan Roux  <yvan.roux@linaro.org>
>
>      PR target/65924
>      gcc.target/arm/pr65924.c: New test.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH, ARM] Fix for pr65924
  2015-04-29 10:26 ` Kyrill Tkachov
@ 2015-04-29 10:57   ` Yvan Roux
  2015-04-29 11:13     ` Kyrill Tkachov
  0 siblings, 1 reply; 4+ messages in thread
From: Yvan Roux @ 2015-04-29 10:57 UTC (permalink / raw)
  To: Kyrill Tkachov; +Cc: gcc-patches

Hi Kyrill,

On 29 April 2015 at 12:06, Kyrill Tkachov <kyrylo.tkachov@arm.com> wrote:
> Hi Yvan,
>
> On 29/04/15 09:57, Yvan Roux wrote:
>>
>> Hi,
>>
>> here is the patch for PR65924, only tested on the original testcase so
>> far.
>
>
> Can you please double check that the problem doesn't appear
> in the other patterns you touched with your cleanup patch?
> i.e. that you don't do match_operand on an out-of-bounds operand number?

Sure, I just re-check all the patterns and there is no other issue.

Cheers,
Yvan

> Thanks,
> Kyrill
>
>
>>
>> Thanks
>> Yvan
>>
>> gcc/
>> 2015-04-29  Yvan Roux  <yvan.roux@linaro.org>
>>
>>      PR target/65924
>>      * config/arm/thumb2.md (*thumb2_addsi3_compare0_scratch): Fix operand
>>      number in type attribute expression.
>>
>> gcc/testsuite/
>> 2015-04-29  Yvan Roux  <yvan.roux@linaro.org>
>>
>>      PR target/65924
>>      gcc.target/arm/pr65924.c: New test.
>
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH, ARM] Fix for pr65924
  2015-04-29 10:57   ` Yvan Roux
@ 2015-04-29 11:13     ` Kyrill Tkachov
  0 siblings, 0 replies; 4+ messages in thread
From: Kyrill Tkachov @ 2015-04-29 11:13 UTC (permalink / raw)
  To: Yvan Roux; +Cc: gcc-patches


On 29/04/15 11:43, Yvan Roux wrote:
> Hi Kyrill,
>
> On 29 April 2015 at 12:06, Kyrill Tkachov <kyrylo.tkachov@arm.com> wrote:
>> Hi Yvan,
>>
>> On 29/04/15 09:57, Yvan Roux wrote:
>>> Hi,
>>>
>>> here is the patch for PR65924, only tested on the original testcase so
>>> far.
>>
>> Can you please double check that the problem doesn't appear
>> in the other patterns you touched with your cleanup patch?
>> i.e. that you don't do match_operand on an out-of-bounds operand number?
> Sure, I just re-check all the patterns and there is no other issue.

Thanks,
Ok for trunk then as it fixes a build failure.

Kyrill

>
> Cheers,
> Yvan
>
>> Thanks,
>> Kyrill
>>
>>
>>> Thanks
>>> Yvan
>>>
>>> gcc/
>>> 2015-04-29  Yvan Roux  <yvan.roux@linaro.org>
>>>
>>>       PR target/65924
>>>       * config/arm/thumb2.md (*thumb2_addsi3_compare0_scratch): Fix operand
>>>       number in type attribute expression.
>>>
>>> gcc/testsuite/
>>> 2015-04-29  Yvan Roux  <yvan.roux@linaro.org>
>>>
>>>       PR target/65924
>>>       gcc.target/arm/pr65924.c: New test.
>>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-04-29 10:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-29  9:02 [PATCH, ARM] Fix for pr65924 Yvan Roux
2015-04-29 10:26 ` Kyrill Tkachov
2015-04-29 10:57   ` Yvan Roux
2015-04-29 11:13     ` Kyrill Tkachov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).