[PATCH] D128787: [AArch64] Make FeatureFuseAdrpAdd a tune feature
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 29 11:13:37 PDT 2022
MaskRay updated this revision to Diff 441095.
MaskRay marked an inline comment as done.
MaskRay added a comment.
move a comment
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D128787/new/
https://reviews.llvm.org/D128787
Files:
llvm/lib/Target/AArch64/AArch64.td
llvm/test/CodeGen/AArch64/misched-fusion-lit.ll
Index: llvm/test/CodeGen/AArch64/misched-fusion-lit.ll
===================================================================
--- llvm/test/CodeGen/AArch64/misched-fusion-lit.ll
+++ llvm/test/CodeGen/AArch64/misched-fusion-lit.ll
@@ -22,6 +22,19 @@
; CHECKFUSE-NEXT: add {{x[0-9]+}}, [[R]], :lo12:litp
}
+define dso_local i8* @litp_tune_generic(i32 %a, i32 %b) "tune-cpu"="generic" {
+entry:
+ %add = add nsw i32 %b, %a
+ %idx.ext = sext i32 %add to i64
+ %add.ptr = getelementptr i8, i8* bitcast (i8* (i32, i32)* @litp_tune_generic to i8*), i64 %idx.ext
+ store i8* %add.ptr, i8** @g, align 8
+ ret i8* %add.ptr
+
+; CHECK-LABEL: litp_tune_generic:
+; CHECK: adrp [[R:x[0-9]+]], litp_tune_generic
+; CHECK-NEXT: add {{x[0-9]+}}, [[R]], :lo12:litp_tune_generic
+}
+
define dso_local i32 @liti(i32 %a, i32 %b) {
entry:
%add = add i32 %a, -262095121
Index: llvm/lib/Target/AArch64/AArch64.td
===================================================================
--- llvm/lib/Target/AArch64/AArch64.td
+++ llvm/lib/Target/AArch64/AArch64.td
@@ -1090,14 +1090,14 @@
// ETE and TRBE are future architecture extensions. We temporarily enable them
// by default for users targeting generic AArch64. The extensions do not
// affect code generated by the compiler and can be used only by explicitly
- // mentioning the new system register names in assembly. FeatureFuseAdrpAdd is
- // enabled under Generic to allow linker merging optimizations.
- list<SubtargetFeature> Generic = [FeatureFPARMv8, FeatureNEON, FeatureETE,
- FeatureFuseAdrpAdd];
+ // mentioning the new system register names in assembly.
+ list<SubtargetFeature> Generic = [FeatureFPARMv8, FeatureNEON, FeatureETE];
}
+// FeatureFuseAdrpAdd is enabled under Generic to allow linker merging
+// optimizations.
def : ProcessorModel<"generic", CortexA55Model, ProcessorFeatures.Generic,
- [FeatureFuseAES, FeaturePostRAScheduler]>;
+ [FeatureFuseAES, FeatureFuseAdrpAdd, FeaturePostRAScheduler]>;
def : ProcessorModel<"cortex-a35", CortexA53Model, ProcessorFeatures.A53,
[TuneA35]>;
def : ProcessorModel<"cortex-a34", CortexA53Model, ProcessorFeatures.A53,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D128787.441095.patch
Type: text/x-patch
Size: 2249 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220629/22d4c6f7/attachment.bin>
More information about the llvm-commits
mailing list