[PATCH] D118534: [X86] Introduce more common modern tunings into `generic`
Phoebe Wang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 4 18:32:35 PST 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG0b7669f33331: [X86] Introduce more common modern tunings into `generic` (authored by pengfei).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D118534/new/
https://reviews.llvm.org/D118534
Files:
llvm/lib/Target/X86/X86.td
llvm/test/CodeGen/X86/segmented-stacks-dynamic.ll
llvm/test/CodeGen/X86/twoaddr-lea.ll
llvm/test/MC/X86/x86-directive-nops-errors.s
Index: llvm/test/MC/X86/x86-directive-nops-errors.s
===================================================================
--- llvm/test/MC/X86/x86-directive-nops-errors.s
+++ llvm/test/MC/X86/x86-directive-nops-errors.s
@@ -1,5 +1,5 @@
# RUN: not llvm-mc -triple i386 %s -filetype=obj -o /dev/null 2>&1 | FileCheck --check-prefix=X86 %s
-# RUN: not llvm-mc -triple=x86_64 %s -filetype=obj -o /dev/null 2>&1 | FileCheck --check-prefix=X64 %s
+# RUN: not llvm-mc -triple=x86_64 -mcpu=x86-64 %s -filetype=obj -o /dev/null 2>&1 | FileCheck --check-prefix=X64 %s
.nops 4, 3
# X86: :[[@LINE-1]]:1: error: illegal NOP size 3.
Index: llvm/test/CodeGen/X86/twoaddr-lea.ll
===================================================================
--- llvm/test/CodeGen/X86/twoaddr-lea.ll
+++ llvm/test/CodeGen/X86/twoaddr-lea.ll
@@ -108,7 +108,7 @@
; CHECK-NEXT: jne LBB3_9
; CHECK-NEXT: ## %bb.5: ## %bb5
; CHECK-NEXT: ## in Loop: Header=BB3_4 Depth=2
-; CHECK-NEXT: addq $1, %rdx
+; CHECK-NEXT: incq %rdx
; CHECK-NEXT: cmpq %rcx, %rdx
; CHECK-NEXT: jl LBB3_4
; CHECK-NEXT: jmp LBB3_3
Index: llvm/test/CodeGen/X86/segmented-stacks-dynamic.ll
===================================================================
--- llvm/test/CodeGen/X86/segmented-stacks-dynamic.ll
+++ llvm/test/CodeGen/X86/segmented-stacks-dynamic.ll
@@ -47,7 +47,7 @@
; X86-NEXT: testl %esi, %esi
; X86-NEXT: je .LBB0_6
; X86-NEXT: # %bb.8: # %false
-; X86-NEXT: addl $-1, %esi
+; X86-NEXT: decl %esi
; X86-NEXT: subl $12, %esp
; X86-NEXT: pushl %esi
; X86-NEXT: calll test_basic at PLT
@@ -103,7 +103,7 @@
; X64-NEXT: testl %ebx, %ebx
; X64-NEXT: je .LBB0_6
; X64-NEXT: # %bb.8: # %false
-; X64-NEXT: addl $-1, %ebx
+; X64-NEXT: decl %ebx
; X64-NEXT: movl %ebx, %edi
; X64-NEXT: callq test_basic at PLT
; X64-NEXT: jmp .LBB0_7
@@ -157,7 +157,7 @@
; X32ABI-NEXT: testl %ebx, %ebx
; X32ABI-NEXT: je .LBB0_6
; X32ABI-NEXT: # %bb.8: # %false
-; X32ABI-NEXT: addl $-1, %ebx
+; X32ABI-NEXT: decl %ebx
; X32ABI-NEXT: movl %ebx, %edi
; X32ABI-NEXT: callq test_basic at PLT
; X32ABI-NEXT: jmp .LBB0_7
Index: llvm/lib/Target/X86/X86.td
===================================================================
--- llvm/lib/Target/X86/X86.td
+++ llvm/lib/Target/X86/X86.td
@@ -1213,12 +1213,16 @@
// NOTE: 64Bit is here as "generic" is the default llc CPU. The X86Subtarget
// constructor checks that any CPU used in 64-bit mode has Feature64Bit enabled.
// It has no effect on code generation.
+// NOTE: As a default tuning, "generic" aims to produce code optimized for the
+// most common X86 processors. The tunings might be changed over time. It is
+// recommended to use "x86-64" in lit tests for consistency.
def : ProcModel<"generic", SandyBridgeModel,
[FeatureX87, FeatureCMPXCHG8B, Feature64Bit],
[TuningSlow3OpsLEA,
TuningSlowDivide64,
- TuningSlowIncDec,
TuningMacroFusion,
+ TuningFastScalarFSQRT,
+ TuningFast15ByteNOP,
TuningInsertVZEROUPPER]>;
def : Proc<"i386", [FeatureX87],
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D118534.406142.patch
Type: text/x-patch
Size: 3189 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220205/285c8d43/attachment.bin>
More information about the llvm-commits
mailing list