aboutsummaryrefslogtreecommitdiff
path: root/gcc/cse.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2014-04-11 12:11:01 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2014-04-11 12:11:01 +0200
commitd8d6ea53a713ae30e8e4ccbe14ebec2002ce1f2c (patch)
treee221fee448df9eb7c97c417756159adfc787acd4 /gcc/cse.c
parentf8e6f6bad71813e122ecf566c01fab78c0930855 (diff)
downloadgcc-d8d6ea53a713ae30e8e4ccbe14ebec2002ce1f2c.zip
gcc-d8d6ea53a713ae30e8e4ccbe14ebec2002ce1f2c.tar.gz
gcc-d8d6ea53a713ae30e8e4ccbe14ebec2002ce1f2c.tar.bz2
re PR rtl-optimization/60663 (Errors out on valid inline asm)
PR rtl-optimization/60663 * cse.c (cse_insn): Set src_volatile on ASM_OPERANDS in PARALLEL. * gcc.target/arm/pr60663.c: New test. From-SVN: r209293
Diffstat (limited to 'gcc/cse.c')
-rw-r--r--gcc/cse.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/cse.c b/gcc/cse.c
index 852d13e..b8223f7 100644
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -4642,6 +4642,13 @@ cse_insn (rtx insn)
&& REGNO (dest) >= FIRST_PSEUDO_REGISTER)
sets[i].src_volatile = 1;
+ /* Also do not record result of a non-volatile inline asm with
+ more than one result or with clobbers, we do not want CSE to
+ break the inline asm apart. */
+ else if (GET_CODE (src) == ASM_OPERANDS
+ && GET_CODE (x) == PARALLEL)
+ sets[i].src_volatile = 1;
+
#if 0
/* It is no longer clear why we used to do this, but it doesn't
appear to still be needed. So let's try without it since this