diff options
author | nickc <nickc@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-08-26 13:03:02 +0000 |
---|---|---|
committer | nickc <nickc@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-08-26 13:03:02 +0000 |
commit | 4c6c862186f911ac314c5ae8bcf3eef978fe7057 (patch) | |
tree | 2436ebe0e50d1b001d4f6922d209fa1a8058f6c2 /gcc/config/m32r | |
parent | 9e456ff70008f4b5060b03290955ac630e07328d (diff) | |
download | gcc-4c6c862186f911ac314c5ae8bcf3eef978fe7057.tar.gz |
PR target/17119.
config/m32r.c (gen_compare): Use reg_or_int16_operand when checking for a
valid constant, regardless of sign.
testsuite/gcc.c-torture/compile/pr17119.c: New test (for this failure)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@86619 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/m32r')
-rw-r--r-- | gcc/config/m32r/m32r.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/gcc/config/m32r/m32r.c b/gcc/config/m32r/m32r.c index ca4079f5ffa..9e3404a1891 100644 --- a/gcc/config/m32r/m32r.c +++ b/gcc/config/m32r/m32r.c @@ -1174,11 +1174,8 @@ gen_compare (enum rtx_code code, rtx x, rtx y, int need_compare) y = force_reg (GET_MODE (x), y); else { - int ok_const = - (code == LTU || code == LEU || code == GTU || code == GEU) - ? uint16_operand (y, GET_MODE (y)) - : reg_or_cmp_int16_operand (y, GET_MODE (y)); - + int ok_const = reg_or_int16_operand (y, GET_MODE (y)); + if (! ok_const) y = force_reg (GET_MODE (x), y); } |