re PR target/68416 ([MPX] GCC emits a lot of redundant bndmov instructions)
authorIlya Enkovich <ienkovich@gcc.gnu.org>
Thu, 26 Nov 2015 11:49:20 +0000 (11:49 +0000)
committerIlya Enkovich <ienkovich@gcc.gnu.org>
Thu, 26 Nov 2015 11:49:20 +0000 (11:49 +0000)
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.

From-SVN: r230938

gcc/ChangeLog
gcc/config/i386/i386.h
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/mpx/pr68416.c [new file with mode: 0644]

index c021524d79f53e67eb820766edc0d1cf1367feec..55c8820cfe64c9d2005e87922fc2e00285b2d1a0 100644 (file)
@@ -1,3 +1,9 @@
+2015-11-26  Vladimir Makarov  <vmakarov@redhat.com>
+
+       PR target/68416
+       * config/i386/i386.h (enum reg_class): Add
+       bounds registers to ALL_REGS.
+
 2015-11-26  Jakub Jelinek  <jakub@redhat.com>
 
        PR tree-optimization/68128
index ceda4722db943ffe06901b9e18e237fc0953f3a4..e69c9cc456337d4b6a8b850c9a22f51d0259d636 100644 (file)
@@ -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:
index 1152137137378e360620f94544ab4e161cb10def..6f6cc20ba0e0a7bd2f87ec4b8097212bb0a586a3 100644 (file)
@@ -1,3 +1,8 @@
+2015-11-26  Ilya Enkovich  <enkovich.gnu@gmail.com>
+
+       PR target/68416
+       * gcc.target/i386/mpx/pr68416.c: New test.
+
 2015-11-26  Paolo Carlini  <paolo.carlini@oracle.com>
 
        PR c++/67313
diff --git a/gcc/testsuite/gcc.target/i386/mpx/pr68416.c b/gcc/testsuite/gcc.target/i386/mpx/pr68416.c
new file mode 100644 (file)
index 0000000..10587ed
--- /dev/null
@@ -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];
+}