Skip to content

Commit e75a4b6

Browse files
committed
[RISCV] Remove NotHasStdExtZbb predicate from zext.h/sext.b/sext.h InstAliases. NFC
NotHasStdExtZbb doesn't have an AssemblerPredicate associated with it so it didn't do anything. We don't need it either because the sorting rules in tablegen prioritize by number of predicates. So the dedicated instructions in the B extension that have predicates will be prioritized automatically.
1 parent ecf6966 commit e75a4b6

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

llvm/lib/Target/RISCV/RISCV.td

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ def HasStdExtZbbOrZbp
126126
AssemblerPredicate<(any_of FeatureExtZbb, FeatureExtZbp)>;
127127
def NotHasStdExtZbbOrZbp
128128
: Predicate<"!(Subtarget->hasStdExtZbb() || Subtarget->hasStdExtZbp())">;
129-
def NotHasStdExtZbb : Predicate<"!Subtarget->hasStdExtZbb()">;
130129

131130
def FeatureExtZbproposedc
132131
: SubtargetFeature<"experimental-zbproposedc", "HasStdExtZbproposedc", "true",

llvm/lib/Target/RISCV/RISCVInstrInfo.td

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1074,19 +1074,19 @@ def PseudoLA_TLS_GD : Pseudo<(outs GPR:$dst), (ins bare_symbol:$src), [],
10741074

10751075
// There are single-instruction versions of these in Zbb, so disable these
10761076
// Pseudos if that extension is present.
1077-
let Predicates = [NotHasStdExtZbb], hasSideEffects = 0, mayLoad = 0,
1077+
let hasSideEffects = 0, mayLoad = 0,
10781078
mayStore = 0, isCodeGenOnly = 0, isAsmParserOnly = 1 in {
10791079
def PseudoSEXT_B : Pseudo<(outs GPR:$rd), (ins GPR:$rs), [], "sext.b", "$rd, $rs">;
10801080
def PseudoSEXT_H : Pseudo<(outs GPR:$rd), (ins GPR:$rs), [], "sext.h", "$rd, $rs">;
10811081
// rv64's sext.w is defined above, using InstAlias<"sext.w ...
10821082
// zext.b is defined above, using InstAlias<"zext.b ...
10831083
def PseudoZEXT_H : Pseudo<(outs GPR:$rd), (ins GPR:$rs), [], "zext.h", "$rd, $rs">;
1084-
} // Predicates = [NotHasStdExtZbb], ...
1084+
} // hasSideEffects = 0, ...
10851085

1086-
let Predicates = [NotHasStdExtZbb, IsRV64], hasSideEffects = 0, mayLoad = 0, mayStore = 0,
1086+
let Predicates = [IsRV64], hasSideEffects = 0, mayLoad = 0, mayStore = 0,
10871087
isCodeGenOnly = 0, isAsmParserOnly = 1 in {
10881088
def PseudoZEXT_W : Pseudo<(outs GPR:$rd), (ins GPR:$rs), [], "zext.w", "$rd, $rs">;
1089-
} // Predicates = [NotHasStdExtZbb, IsRV64], ...
1089+
} // Predicates = [IsRV64], ...
10901090

10911091
/// Loads
10921092

0 commit comments

Comments
 (0)