* [PATCH, PR target/68416, i386, MPX] Add bounds registers to ALL_REGS set
@ 2015-11-26 10:11 Ilya Enkovich
0 siblings, 0 replies; 6+ messages in thread
From: Ilya Enkovich @ 2015-11-26 10:11 UTC (permalink / raw)
To: gcc-patches
Hi,
This patch fixes redundant bndmov problem by adding bounds registers to
ALL_REGS set. This patch was bootstrapped and regtested on
x86_64-unknown-linux-gnu. OK for trunk and gcc-5-branch?
Thanks,
Ilya
--
gcc/
2015-11-26 Vladimir Makarov <vmakarov@redhat.com>
PR target/68416
* config/i386/i386.h (enum reg_class): Add
bounds registers to ALL_REGS.
gcc/testsuite/
2015-11-26 Ilya Enkovich <enkovich.gnu@gmail.com>
PR target/68416
* gcc.target/i386/mpx/pr68416.c: New test.
diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h
index ceda472..e69c9cc 100644
--- a/gcc/config/i386/i386.h
+++ b/gcc/config/i386/i386.h
@@ -1457,7 +1457,7 @@ enum reg_class
{ 0x1ff1ffff,0xffffffe0, 0x1f }, /* FLOAT_INT_SSE_REGS */ \
{ 0x0, 0x0, 0x1fc0 }, /* MASK_EVEX_REGS */ \
{ 0x0, 0x0, 0x1fe0 }, /* MASK_REGS */ \
-{ 0xffffffff,0xffffffff, 0x1fff } \
+{ 0xffffffff,0xffffffff,0x1ffff } \
}
/* The same information, inverted:
diff --git a/gcc/testsuite/gcc.target/i386/mpx/pr68416.c b/gcc/testsuite/gcc.target/i386/mpx/pr68416.c
new file mode 100644
index 0000000..10587ed
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/mpx/pr68416.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mmpx -fcheck-pointer-bounds" } */
+/* { dg-final { scan-assembler-not "bndmov" } } */
+
+int
+foo(int **arr, int i)
+{
+ return (*arr)[i];
+}
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH, PR target/68416, i386, MPX] Add bounds registers to ALL_REGS set
2015-11-26 12:19 ` Richard Biener
@ 2015-11-26 12:35 ` Ilya Enkovich
0 siblings, 0 replies; 6+ messages in thread
From: Ilya Enkovich @ 2015-11-26 12:35 UTC (permalink / raw)
To: Richard Biener; +Cc: Uros Bizjak, gcc-patches
2015-11-26 15:18 GMT+03:00 Richard Biener <rguenther@suse.de>:
> On Thu, 26 Nov 2015, Uros Bizjak wrote:
>
>> On Thu, Nov 26, 2015 at 12:46 PM, Ilya Enkovich <enkovich.gnu@gmail.com> wrote:
>> > 2015-11-26 13:15 GMT+03:00 Uros Bizjak <ubizjak@gmail.com>:
>>
>> >>> 2015-11-26 Vladimir Makarov <vmakarov@redhat.com>
>> >>>
>> >>> PR target/68416
>> >>> * config/i386/i386.h (enum reg_class): Add
>> >>> bounds registers to ALL_REGS.
>> >>>
>> >>> gcc/testsuite/
>> >>>
>> >>> 2015-11-26 Ilya Enkovich <enkovich.gnu@gmail.com>
>> >>>
>> >>> PR target/68416
>> >>> * gcc.target/i386/mpx/pr68416.c: New test.
>> >>
>> >> OK for mainline and gcc-5 after gcc 5.3 is released.
>> >
>> > Do you think this patch is not safe? This would be useful for 5.3
>> > because it significantly reduces MPX overhead on some benchmarks.
>>
>> Although it looks safe, it is just a couple of days before the
>> release. Let's ask release manager.
>
> I don't consider MPX support release critical so fine with me for 5.3.
Thanks!
Ilya
>
> Richard.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH, PR target/68416, i386, MPX] Add bounds registers to ALL_REGS set
2015-11-26 12:15 ` Uros Bizjak
@ 2015-11-26 12:19 ` Richard Biener
2015-11-26 12:35 ` Ilya Enkovich
0 siblings, 1 reply; 6+ messages in thread
From: Richard Biener @ 2015-11-26 12:19 UTC (permalink / raw)
To: Uros Bizjak; +Cc: Ilya Enkovich, gcc-patches
On Thu, 26 Nov 2015, Uros Bizjak wrote:
> On Thu, Nov 26, 2015 at 12:46 PM, Ilya Enkovich <enkovich.gnu@gmail.com> wrote:
> > 2015-11-26 13:15 GMT+03:00 Uros Bizjak <ubizjak@gmail.com>:
>
> >>> 2015-11-26 Vladimir Makarov <vmakarov@redhat.com>
> >>>
> >>> PR target/68416
> >>> * config/i386/i386.h (enum reg_class): Add
> >>> bounds registers to ALL_REGS.
> >>>
> >>> gcc/testsuite/
> >>>
> >>> 2015-11-26 Ilya Enkovich <enkovich.gnu@gmail.com>
> >>>
> >>> PR target/68416
> >>> * gcc.target/i386/mpx/pr68416.c: New test.
> >>
> >> OK for mainline and gcc-5 after gcc 5.3 is released.
> >
> > Do you think this patch is not safe? This would be useful for 5.3
> > because it significantly reduces MPX overhead on some benchmarks.
>
> Although it looks safe, it is just a couple of days before the
> release. Let's ask release manager.
I don't consider MPX support release critical so fine with me for 5.3.
Richard.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH, PR target/68416, i386, MPX] Add bounds registers to ALL_REGS set
2015-11-26 11:49 ` Ilya Enkovich
@ 2015-11-26 12:15 ` Uros Bizjak
2015-11-26 12:19 ` Richard Biener
0 siblings, 1 reply; 6+ messages in thread
From: Uros Bizjak @ 2015-11-26 12:15 UTC (permalink / raw)
To: Ilya Enkovich; +Cc: gcc-patches, Richard Biener
On Thu, Nov 26, 2015 at 12:46 PM, Ilya Enkovich <enkovich.gnu@gmail.com> wrote:
> 2015-11-26 13:15 GMT+03:00 Uros Bizjak <ubizjak@gmail.com>:
>>> 2015-11-26 Vladimir Makarov <vmakarov@redhat.com>
>>>
>>> PR target/68416
>>> * config/i386/i386.h (enum reg_class): Add
>>> bounds registers to ALL_REGS.
>>>
>>> gcc/testsuite/
>>>
>>> 2015-11-26 Ilya Enkovich <enkovich.gnu@gmail.com>
>>>
>>> PR target/68416
>>> * gcc.target/i386/mpx/pr68416.c: New test.
>>
>> OK for mainline and gcc-5 after gcc 5.3 is released.
>
> Do you think this patch is not safe? This would be useful for 5.3
> because it significantly reduces MPX overhead on some benchmarks.
Although it looks safe, it is just a couple of days before the
release. Let's ask release manager.
Uros.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH, PR target/68416, i386, MPX] Add bounds registers to ALL_REGS set
2015-11-26 10:18 Uros Bizjak
@ 2015-11-26 11:49 ` Ilya Enkovich
2015-11-26 12:15 ` Uros Bizjak
0 siblings, 1 reply; 6+ messages in thread
From: Ilya Enkovich @ 2015-11-26 11:49 UTC (permalink / raw)
To: Uros Bizjak; +Cc: gcc-patches
2015-11-26 13:15 GMT+03:00 Uros Bizjak <ubizjak@gmail.com>:
> Hello!
>
>> gcc/
>>
>> 2015-11-26 Vladimir Makarov <vmakarov@redhat.com>
>>
>> PR target/68416
>> * config/i386/i386.h (enum reg_class): Add
>> bounds registers to ALL_REGS.
>>
>> gcc/testsuite/
>>
>> 2015-11-26 Ilya Enkovich <enkovich.gnu@gmail.com>
>>
>> PR target/68416
>> * gcc.target/i386/mpx/pr68416.c: New test.
>
> OK for mainline and gcc-5 after gcc 5.3 is released.
Do you think this patch is not safe? This would be useful for 5.3
because it significantly reduces MPX overhead on some benchmarks.
Thanks,
Ilya
>
> Thanks,
> Uros.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH, PR target/68416, i386, MPX] Add bounds registers to ALL_REGS set
@ 2015-11-26 10:18 Uros Bizjak
2015-11-26 11:49 ` Ilya Enkovich
0 siblings, 1 reply; 6+ messages in thread
From: Uros Bizjak @ 2015-11-26 10:18 UTC (permalink / raw)
To: gcc-patches
Cc: Илья
Энкович
Hello!
> gcc/
>
> 2015-11-26 Vladimir Makarov <vmakarov@redhat.com>
>
> PR target/68416
> * config/i386/i386.h (enum reg_class): Add
> bounds registers to ALL_REGS.
>
> gcc/testsuite/
>
> 2015-11-26 Ilya Enkovich <enkovich.gnu@gmail.com>
>
> PR target/68416
> * gcc.target/i386/mpx/pr68416.c: New test.
OK for mainline and gcc-5 after gcc 5.3 is released.
Thanks,
Uros.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-11-26 12:19 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-26 10:11 [PATCH, PR target/68416, i386, MPX] Add bounds registers to ALL_REGS set Ilya Enkovich
2015-11-26 10:18 Uros Bizjak
2015-11-26 11:49 ` Ilya Enkovich
2015-11-26 12:15 ` Uros Bizjak
2015-11-26 12:19 ` Richard Biener
2015-11-26 12:35 ` Ilya Enkovich
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).