re PR target/79353 (ICE in curr_insn_transform, at lra-constraints.c:3773)
PR target/79353 * config/sparc/sync.md (atomic_loaddi_1): Replace 'U' constraint with 'r', 'm' constraint with 'T' and !TARGET_ARCH64 with TARGET_ARCH32. (atomic_storedi_1): Likewise. From-SVN: r245188
This commit is contained in:
parent
46628ab7ac
commit
f3877b2f70
4 changed files with 56 additions and 6 deletions
|
@ -1,3 +1,10 @@
|
|||
2017-02-05 Eric Botcazou <ebotcazou@adacore.com>
|
||||
|
||||
PR target/79353
|
||||
* config/sparc/sync.md (atomic_loaddi_1): Replace 'U' constraint with
|
||||
'r', 'm' constraint with 'T' and !TARGET_ARCH64 with TARGET_ARCH32.
|
||||
(atomic_storedi_1): Likewise.
|
||||
|
||||
2017-02-04 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR tree-optimization/79338
|
||||
|
|
|
@ -133,10 +133,10 @@
|
|||
})
|
||||
|
||||
(define_insn "atomic_loaddi_1"
|
||||
[(set (match_operand:DI 0 "register_operand" "=U,?*f")
|
||||
(unspec:DI [(match_operand:DI 1 "memory_operand" "m,m")]
|
||||
[(set (match_operand:DI 0 "register_operand" "=r,?*f")
|
||||
(unspec:DI [(match_operand:DI 1 "memory_operand" "T,T")]
|
||||
UNSPEC_ATOMIC))]
|
||||
"!TARGET_ARCH64"
|
||||
"TARGET_ARCH32"
|
||||
"ldd\t%1, %0"
|
||||
[(set_attr "type" "load,fpload")])
|
||||
|
||||
|
@ -160,11 +160,11 @@
|
|||
})
|
||||
|
||||
(define_insn "atomic_storedi_1"
|
||||
[(set (match_operand:DI 0 "memory_operand" "=m,m,m")
|
||||
[(set (match_operand:DI 0 "memory_operand" "=T,T,T")
|
||||
(unspec:DI
|
||||
[(match_operand:DI 1 "register_or_v9_zero_operand" "J,U,?*f")]
|
||||
[(match_operand:DI 1 "register_or_v9_zero_operand" "J,r,?*f")]
|
||||
UNSPEC_ATOMIC))]
|
||||
"!TARGET_ARCH64"
|
||||
"TARGET_ARCH32"
|
||||
"@
|
||||
stx\t%r1, %0
|
||||
std\t%1, %0
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2017-02-05 Eric Botcazou <ebotcazou@adacore.com>
|
||||
|
||||
* gcc.target/sparc/20170205-1.c: New test.
|
||||
|
||||
2017-02-03 John David Anglin <danglin@gcc.gnu.org>
|
||||
|
||||
* gfortran.dg/coarray_43.f90: Add "-latomic" option if
|
||||
|
|
39
gcc/testsuite/gcc.target/sparc/20170205-1.c
Normal file
39
gcc/testsuite/gcc.target/sparc/20170205-1.c
Normal file
|
@ -0,0 +1,39 @@
|
|||
/* PR target/79363 */
|
||||
/* Reported by John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> */
|
||||
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-O2 -fPIC -mcpu=v8" } */
|
||||
|
||||
struct d { long long h; };
|
||||
|
||||
struct c { struct d *e; };
|
||||
|
||||
int f, g;
|
||||
|
||||
extern void bar (long long *);
|
||||
extern int baz (long long *, int);
|
||||
|
||||
void foo (struct c *desc)
|
||||
{
|
||||
int begin, end, j;
|
||||
long long k, l, h;
|
||||
for (;;) {
|
||||
for (;;)
|
||||
break;
|
||||
for (;;) {
|
||||
j++;
|
||||
l = desc->e[j].h;
|
||||
for (;;) {
|
||||
bar(&l);
|
||||
end = h = begin / 2;
|
||||
if (baz(&h, g))
|
||||
begin = f;
|
||||
break;
|
||||
}
|
||||
if (end) {
|
||||
__atomic_store_n(&k, end, 5);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue