diff --git a/llvm/lib/Target/RISCV/RISCVFeatures.td b/llvm/lib/Target/RISCV/RISCVFeatures.td index 6df6368929dac..4c761fb6a7ab1 100644 --- a/llvm/lib/Target/RISCV/RISCVFeatures.td +++ b/llvm/lib/Target/RISCV/RISCVFeatures.td @@ -459,7 +459,7 @@ def FeatureStdExtZce [FeatureStdExtZcb, FeatureStdExtZcmp, FeatureStdExtZcmt]>; def HasStdExtCOrZcfOrZce - : Predicate<"Subtarget->hasStdExtC() || Subtarget->hasStdExtZcf() " + : Predicate<"Subtarget->hasStdExtC() || Subtarget->hasStdExtZcf() ||" "Subtarget->hasStdExtZce()">, AssemblerPredicate<(any_of FeatureStdExtC, FeatureStdExtZcf, FeatureStdExtZce), diff --git a/llvm/lib/Target/RISCV/RISCVInstrInfoC.td b/llvm/lib/Target/RISCV/RISCVInstrInfoC.td index fd8591f5ab2d8..17d73e6d6d0b2 100644 --- a/llvm/lib/Target/RISCV/RISCVInstrInfoC.td +++ b/llvm/lib/Target/RISCV/RISCVInstrInfoC.td @@ -870,7 +870,7 @@ def : CompressPat<(LW_INX GPRF32C:$rd, GPRCMem:$rs1, uimm7_lsb00:$imm), let Predicates = [HasStdExtCOrZcfOrZce, HasStdExtF, IsRV32] in { def : CompressPat<(FLW FPR32C:$rd, GPRCMem:$rs1, uimm7_lsb00:$imm), (C_FLW FPR32C:$rd, GPRCMem:$rs1, uimm7_lsb00:$imm)>; -} // Predicates = [HasStdExtC, HasStdExtF, IsRV32] +} // Predicates = [HasStdExtCOrZcfOrZce, HasStdExtF, IsRV32] let Predicates = [HasStdExtCOrZca, IsRV64] in { def : CompressPat<(LD GPRC:$rd, GPRCMem:$rs1, uimm8_lsb000:$imm), @@ -894,7 +894,7 @@ def : CompressPat<(SW_INX GPRF32C:$rs2, GPRCMem:$rs1, uimm7_lsb00:$imm), let Predicates = [HasStdExtCOrZcfOrZce, HasStdExtF, IsRV32] in { def : CompressPat<(FSW FPR32C:$rs2, GPRCMem:$rs1, uimm7_lsb00:$imm), (C_FSW FPR32C:$rs2, GPRCMem:$rs1, uimm7_lsb00:$imm)>; -} // Predicates = [HasStdExtC, HasStdExtF, IsRV32] +} // Predicates = [HasStdExtCOrZcfOrZce, HasStdExtF, IsRV32] let Predicates = [HasStdExtCOrZca, IsRV64] in { def : CompressPat<(SD GPRC:$rs2, GPRCMem:$rs1, uimm8_lsb000:$imm), @@ -1001,7 +1001,7 @@ def : CompressPat<(LW_INX GPRF32NoX0:$rd, SPMem:$rs1, uimm8_lsb00:$imm), let Predicates = [HasStdExtCOrZcfOrZce, HasStdExtF, IsRV32] in { def : CompressPat<(FLW FPR32:$rd, SPMem:$rs1, uimm8_lsb00:$imm), (C_FLWSP FPR32:$rd, SPMem:$rs1, uimm8_lsb00:$imm)>; -} // Predicates = [HasStdExtC, HasStdExtF, IsRV32] +} // Predicates = [HasStdExtCOrZcfOrZce, HasStdExtF, IsRV32] let Predicates = [HasStdExtCOrZca, IsRV64] in { def : CompressPat<(LD GPRNoX0:$rd, SPMem:$rs1, uimm9_lsb000:$imm), @@ -1047,7 +1047,7 @@ def : CompressPat<(SW_INX GPRF32:$rs2, SPMem:$rs1, uimm8_lsb00:$imm), let Predicates = [HasStdExtCOrZcfOrZce, HasStdExtF, IsRV32] in { def : CompressPat<(FSW FPR32:$rs2, SPMem:$rs1, uimm8_lsb00:$imm), (C_FSWSP FPR32:$rs2, SPMem:$rs1, uimm8_lsb00:$imm)>; -} // Predicates = [HasStdExtC, HasStdExtF, IsRV32] +} // Predicates = [HasStdExtCOrZcfOrZce, HasStdExtF, IsRV32] let Predicates = [HasStdExtCOrZca, IsRV64] in { def : CompressPat<(SD GPR:$rs2, SPMem:$rs1, uimm9_lsb000:$imm),