[PATCH] D59872: [X86MacroFusion] Handle branch fusion (AMD CPUs).
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 27 05:01:01 PDT 2019
lebedev.ri added a comment.
Looks good.
Can there be a test that we don't fuse non-CMP/TEST instructions if we only have `branchfusion`?
================
Comment at: llvm/lib/Target/X86/X86.td:347-357
// Sandy Bridge and newer processors have many instructions that can be
// fused with conditional branches and pass through the CPU as a single
// operation.
def FeatureMacroFusion
: SubtargetFeature<"macrofusion", "HasMacroFusion", "true",
"Various instructions can be fused with conditional branches">;
----------------
I think it would be better to swap these around?
`FeatureMacroFusion` is a superset of `FeatureBranchFusion`.
(maybe even inherit `FeatureBranchFusion` by `FeatureMacroFusion`, not sure it is possible here.)
================
Comment at: llvm/lib/Target/X86/X86.td:354
+// Bulldozer and newer processors can merge CMP/TEST with conditional branches.
+def FeatureBranchFusion
----------------
```
// Bulldozer and newer processors can merge CMP/TEST (but not other instructions)
// with conditional branches.
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59872/new/
https://reviews.llvm.org/D59872
More information about the llvm-commits
mailing list