From e7c338081a8e5f145654781a58175f5edb3aa9d6 Mon Sep 17 00:00:00 2001 From: Javed Absar Date: Tue, 18 Oct 2016 09:08:54 +0000 Subject: [PATCH] [ARM] Assign cost of scaling for Cortex-R52 This patch assigns cost of the scaling used in addressing for Cortex-R52. On Cortex-R52 a negated register offset takes longer than a non-negated register offset, in a register-offset addressing mode. Differential Revision: http://reviews.llvm.org/D25670 Reviewer: jmolloy llvm-svn: 284460 --- llvm/lib/Target/ARM/ARM.td | 3 ++- llvm/test/CodeGen/ARM/lsr-scale-addr-mode.ll | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/llvm/lib/Target/ARM/ARM.td b/llvm/lib/Target/ARM/ARM.td index d0da6d8..0d95735 100644 --- a/llvm/lib/Target/ARM/ARM.td +++ b/llvm/lib/Target/ARM/ARM.td @@ -823,7 +823,8 @@ def : ProcNoItin<"exynos-m2", [ARMv8a, ProcExynosM1, FeatureCrypto, FeatureCRC]>; -def : ProcNoItin<"cortex-r52", [ARMv8r, ProcR52]>; +def : ProcNoItin<"cortex-r52", [ARMv8r, ProcR52, + FeatureFPAO]>; //===----------------------------------------------------------------------===// // Register File Description diff --git a/llvm/test/CodeGen/ARM/lsr-scale-addr-mode.ll b/llvm/test/CodeGen/ARM/lsr-scale-addr-mode.ll index d8c979c..c50e42b 100644 --- a/llvm/test/CodeGen/ARM/lsr-scale-addr-mode.ll +++ b/llvm/test/CodeGen/ARM/lsr-scale-addr-mode.ll @@ -1,8 +1,9 @@ ; RUN: llc -mtriple=arm-eabi %s -o - | FileCheck %s ; Should use scaled addressing mode. -; RUN: llc -mtriple=arm-eabi -mcpu=cortex-a53 %s -o - | FileCheck %s -check-prefix CHECK-NONEGOFF-A53 -; RUN: llc -mtriple=arm-eabi -mcpu=cortex-a57 %s -o - | FileCheck %s -check-prefix CHECK-NONEGOFF-A57 +; RUN: llc -mtriple=arm-eabi -mcpu=cortex-a53 %s -o - | FileCheck %s -check-prefix CHECK-NONEGOFF +; RUN: llc -mtriple=arm-eabi -mcpu=cortex-a57 %s -o - | FileCheck %s -check-prefix CHECK-NONEGOFF +; RUN: llc -mtriple=arm-eabi -mcpu=cortex-r52 %s -o - | FileCheck %s -check-prefix CHECK-NONEGOFF ; Should not generate negated register offset define void @sintzero(i32* %a) nounwind { @@ -23,6 +24,5 @@ return: ; preds = %cond_next } ; CHECK: lsl{{.*}}#2] -; CHECK-NONEGOFF-A53: [{{r[0-9]+}}, {{r[0-9]+}}, lsl{{.*}}#2] -; CHECK-NONEGOFF-A57: [{{r[0-9]+}}, {{r[0-9]+}}, lsl{{.*}}#2] +; CHECK-NONEGOFF: [{{r[0-9]+}}, {{r[0-9]+}}, lsl{{.*}}#2] -- 2.7.4