aboutsummaryrefslogtreecommitdiff
path: root/gcc/function.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2018-03-23 10:10:02 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2018-03-23 10:10:02 +0100
commitb3d8938043f400cb462600c3f5fb7d346c45caea (patch)
tree87a36277bfe60adbaba670aa6d98cea3143ac6fb /gcc/function.c
parent6f5799be393e835b4cce70d070ae30039fdf38a7 (diff)
downloadgcc-b3d8938043f400cb462600c3f5fb7d346c45caea.zip
gcc-b3d8938043f400cb462600c3f5fb7d346c45caea.tar.gz
gcc-b3d8938043f400cb462600c3f5fb7d346c45caea.tar.bz2
re PR inline-asm/85034 (-O1 internal compiler error: in elimination_costs_in_insn, at reload1.c:3633)
PR inline-asm/85034 * function.c (match_asm_constraints_1): Don't optimize if input doesn't satisfy general_operand predicate for output's mode. * gcc.target/i386/pr85034.c: New test. From-SVN: r258796
Diffstat (limited to 'gcc/function.c')
-rw-r--r--gcc/function.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/function.c b/gcc/function.c
index 485ddfb..61515e3 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -6661,10 +6661,9 @@ match_asm_constraints_1 (rtx_insn *insn, rtx *p_sets, int noutputs)
/* Only do the transformation for pseudos. */
if (! REG_P (output)
|| rtx_equal_p (output, input)
- || (GET_MODE (input) != VOIDmode
- && GET_MODE (input) != GET_MODE (output))
|| !(REG_P (input) || SUBREG_P (input)
- || MEM_P (input) || CONSTANT_P (input)))
+ || MEM_P (input) || CONSTANT_P (input))
+ || !general_operand (input, GET_MODE (output)))
continue;
/* We can't do anything if the output is also used as input,