diff options
author | Jakub Jelinek <jakub@redhat.com> | 2018-03-03 13:52:29 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2018-03-03 13:52:29 +0000 |
commit | 22390eba166f3c0ff8a4875dfe25cb679d7b03de (patch) | |
tree | a9e5a5d5e94b735f5beb895ee582c698f234af68 /gcc/config/aarch64 | |
parent | 1172a55e8474f637e7cb36bc15c09af3b4da93f3 (diff) | |
parent | 51bd33a394695d4fa3c3fff21de40f69011d418e (diff) |
svn merge -r257169:258208 svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/redhat/gcc-7-branch@258209 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/aarch64')
-rw-r--r-- | gcc/config/aarch64/aarch64-simd.md | 10 | ||||
-rw-r--r-- | gcc/config/aarch64/aarch64.c | 8 | ||||
-rw-r--r-- | gcc/config/aarch64/aarch64.h | 6 | ||||
-rw-r--r-- | gcc/config/aarch64/constraints.md | 4 |
4 files changed, 19 insertions, 9 deletions
diff --git a/gcc/config/aarch64/aarch64-simd.md b/gcc/config/aarch64/aarch64-simd.md index c4621643452..1e0a346e553 100644 --- a/gcc/config/aarch64/aarch64-simd.md +++ b/gcc/config/aarch64/aarch64-simd.md @@ -2490,6 +2490,7 @@ case UNEQ: case ORDERED: case UNORDERED: + case LTGT: break; default: gcc_unreachable (); @@ -2544,6 +2545,15 @@ emit_insn (gen_one_cmpl<v_cmp_result>2 (operands[0], operands[0])); break; + case LTGT: + /* LTGT is not guranteed to not generate a FP exception. So let's + go the faster way : ((a > b) || (b > a)). */ + emit_insn (gen_aarch64_cmgt<mode> (operands[0], + operands[2], operands[3])); + emit_insn (gen_aarch64_cmgt<mode> (tmp, operands[3], operands[2])); + emit_insn (gen_ior<v_cmp_result>3 (operands[0], operands[0], tmp)); + break; + case UNORDERED: /* Operands are ORDERED iff (a > b || b >= a), so we can compute UNORDERED as !ORDERED. */ diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index eaa45248d83..2bd3c5e069f 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -4666,13 +4666,13 @@ aarch64_select_cc_mode (RTX_CODE code, rtx x, rtx y) case UNGT: case UNGE: case UNEQ: - case LTGT: return CCFPmode; case LT: case LE: case GT: case GE: + case LTGT: return CCFPEmode; default: @@ -5723,7 +5723,7 @@ aarch64_class_max_nregs (reg_class_t regclass, machine_mode mode) { switch (regclass) { - case CALLER_SAVE_REGS: + case TAILCALL_ADDR_REGS: case POINTER_REGS: case GENERAL_REGS: case ALL_REGS: @@ -7801,10 +7801,10 @@ aarch64_register_move_cost (machine_mode mode, = aarch64_tune_params.regmove_cost; /* Caller save and pointer regs are equivalent to GENERAL_REGS. */ - if (to == CALLER_SAVE_REGS || to == POINTER_REGS) + if (to == TAILCALL_ADDR_REGS || to == POINTER_REGS) to = GENERAL_REGS; - if (from == CALLER_SAVE_REGS || from == POINTER_REGS) + if (from == TAILCALL_ADDR_REGS || from == POINTER_REGS) from = GENERAL_REGS; /* Moving between GPR and stack cost is the same as GP2GP. */ diff --git a/gcc/config/aarch64/aarch64.h b/gcc/config/aarch64/aarch64.h index 52d6414cbf4..ddf833ebfe8 100644 --- a/gcc/config/aarch64/aarch64.h +++ b/gcc/config/aarch64/aarch64.h @@ -439,7 +439,7 @@ extern unsigned aarch64_architecture_version; enum reg_class { NO_REGS, - CALLER_SAVE_REGS, + TAILCALL_ADDR_REGS, GENERAL_REGS, STACK_REG, POINTER_REGS, @@ -454,7 +454,7 @@ enum reg_class #define REG_CLASS_NAMES \ { \ "NO_REGS", \ - "CALLER_SAVE_REGS", \ + "TAILCALL_ADDR_REGS", \ "GENERAL_REGS", \ "STACK_REG", \ "POINTER_REGS", \ @@ -466,7 +466,7 @@ enum reg_class #define REG_CLASS_CONTENTS \ { \ { 0x00000000, 0x00000000, 0x00000000 }, /* NO_REGS */ \ - { 0x0007ffff, 0x00000000, 0x00000000 }, /* CALLER_SAVE_REGS */ \ + { 0x0004ffff, 0x00000000, 0x00000000 }, /* TAILCALL_ADDR_REGS */\ { 0x7fffffff, 0x00000000, 0x00000003 }, /* GENERAL_REGS */ \ { 0x80000000, 0x00000000, 0x00000000 }, /* STACK_REG */ \ { 0xffffffff, 0x00000000, 0x00000003 }, /* POINTER_REGS */ \ diff --git a/gcc/config/aarch64/constraints.md b/gcc/config/aarch64/constraints.md index 5a252c07afa..9b3c7339c54 100644 --- a/gcc/config/aarch64/constraints.md +++ b/gcc/config/aarch64/constraints.md @@ -21,8 +21,8 @@ (define_register_constraint "k" "STACK_REG" "@internal The stack register.") -(define_register_constraint "Ucs" "CALLER_SAVE_REGS" - "@internal The caller save registers.") +(define_register_constraint "Ucs" "TAILCALL_ADDR_REGS" + "@internal Registers suitable for an indirect tail call") (define_register_constraint "w" "FP_REGS" "Floating point and SIMD vector registers.") |