Skip to content

Commit c6ed91e

Browse files
author
Diogo N. Sampaio
committedJan 4, 2019
[AArch64] Add command-line option predres
Prediction control instructions are only mandatory from v8.5a onwards but is optional from Armv8.0-A. This patch adds a command line option to enable it by it's own. Differential Revision: https://reviews.llvm.org/D56007 llvm-svn: 350385
1 parent 232ab01 commit c6ed91e

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed
 

‎llvm/include/llvm/Support/AArch64TargetParser.def

+1
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ AARCH64_ARCH_EXT_NAME("rng", AArch64::AEK_RAND, "+rand", "-rand")
7474
AARCH64_ARCH_EXT_NAME("memtag", AArch64::AEK_MTE, "+mte", "-mte")
7575
AARCH64_ARCH_EXT_NAME("ssbs", AArch64::AEK_SSBS, "+ssbs", "-ssbs")
7676
AARCH64_ARCH_EXT_NAME("sb", AArch64::AEK_SB, "+sb", "-sb")
77+
AARCH64_ARCH_EXT_NAME("predres", AArch64::AEK_PREDRES, "+predres", "-predres")
7778
#undef AARCH64_ARCH_EXT_NAME
7879

7980
#ifndef AARCH64_CPU_NAME

‎llvm/include/llvm/Support/AArch64TargetParser.h

+1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ enum ArchExtKind : unsigned {
4949
AEK_MTE = 1 << 19,
5050
AEK_SSBS = 1 << 20,
5151
AEK_SB = 1 << 21,
52+
AEK_PREDRES = 1 << 22,
5253
};
5354

5455
enum class ArchKind {

‎llvm/unittests/Support/TargetParserTest.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -990,7 +990,9 @@ TEST(TargetParserTest, AArch64ArchExtFeature) {
990990
{"rng", "norng", "+rand", "-rand"},
991991
{"memtag", "nomemtag", "+mte", "-mte"},
992992
{"ssbs", "nossbs", "+ssbs", "-ssbs"},
993-
{"sb", "nosb", "+sb", "-sb"}};
993+
{"sb", "nosb", "+sb", "-sb"},
994+
{"predres", "nopredres", "+predres", "-predres"}
995+
};
994996

995997
for (unsigned i = 0; i < array_lengthof(ArchExt); i++) {
996998
EXPECT_EQ(StringRef(ArchExt[i][2]),

0 commit comments

Comments
 (0)