diff mbox

patch for PR65729

Message ID CAD57uCezAGmX_ag9kaEdKLUEyLSzeDaFdBbfwgZWG6bZHo3P6w@mail.gmail.com
State New
Headers show

Commit Message

Yvan Roux April 14, 2015, 8:08 a.m. UTC
Hi,

here is the patch that restore the assertion and swap its arguments as
discussed in the PR.

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65729

Bootstrapped and regtested on x86_64, cross built and regtested on
i686, aarch64, arm and armeb. Is it ok for trunk (maybe after 5.1 is
released) ?

Thanks,
Yvan

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

    PR target/65729
    * lra-constraints.c (prohibited_class_reg_set_mode_p): Restore and fix
    the assertion.

gcc/testsuite/
2015-04-13  Yvan Roux  <yvan.roux@st.com>

    PR target/65729
    * gcc.target/arm/pr65729.c: New test.

On 10 April 2015 at 18:39, Vladimir Makarov <vmakarov@redhat.com> wrote:
> I've committed the following patch for
>
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65729
>
>  The assert is definitely wrong.  We will work for the right one for
> GCC-5.1.
>
> Committed as rev. 221975.
>
> 2015-04-10  Vladimir Makarov <vmakarov@redhat.com>
>
>         PR target/65729
>         * lra-constraints.c (prohibited_class_reg_set_mode_p): Comment the
>         assert.
>
> Index: lra-constraints.c
> ===================================================================
> --- lra-constraints.c   (revision 221949)
> +++ lra-constraints.c   (working copy)
> @@ -1656,7 +1656,8 @@
>  {
> HARD_REG_SET temp;
>
> -  lra_assert (hard_reg_set_subset_p (set, reg_class_contents[rclass]));
> +  // ??? Is this assert right
> +  // lra_assert (hard_reg_set_subset_p (set, reg_class_contents[rclass]));
> COPY_HARD_REG_SET (temp, set);
> AND_COMPL_HARD_REG_SET (temp, lra_no_alloc_regs);
>    return (hard_reg_set_subset_p
>
diff mbox

Patch

diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c
index 7353e7c..c51a25b 100644
--- a/gcc/lra-constraints.c
+++ b/gcc/lra-constraints.c
@@ -1656,8 +1656,7 @@  prohibited_class_reg_set_mode_p (enum reg_class rclass,
 {
   HARD_REG_SET temp;
   
-  // ??? Is this assert right
-  // lra_assert (hard_reg_set_subset_p (set, reg_class_contents[rclass]));
+  lra_assert (hard_reg_set_subset_p (reg_class_contents[rclass],set));
   COPY_HARD_REG_SET (temp, set);
   AND_COMPL_HARD_REG_SET (temp, lra_no_alloc_regs);
   return (hard_reg_set_subset_p
diff --git a/gcc/testsuite/gcc.target/arm/pr65729.c b/gcc/testsuite/gcc.target/arm/pr65729.c
new file mode 100644
index 0000000..0d7e3c1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/pr65729.c
@@ -0,0 +1,9 @@ 
+/* { dg-do compile } */
+/* { dg-options "-O2 -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16" } */
+
+int foo (void)
+{
+  double x = 0.0;
+  asm volatile ("" : "+gw" (x));
+  return x;
+}