Skip to content

Commit fe7776e

Browse files
Revert "[RISCV] Add Qualcomm uC Xqcisync (Sync Delay) extension (#132184)"
This reverts commit 3840f78. Multiple builtbot failures have been reported: #132184
1 parent 3840f78 commit fe7776e

File tree

14 files changed

+13
-317
lines changed

14 files changed

+13
-317
lines changed

clang/test/Driver/print-supported-extensions-riscv.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,6 @@
213213
// CHECK-NEXT: xqcilsm 0.2 'Xqcilsm' (Qualcomm uC Load Store Multiple Extension)
214214
// CHECK-NEXT: xqcisim 0.2 'Xqcisim' (Qualcomm uC Simulation Hint Extension)
215215
// CHECK-NEXT: xqcisls 0.2 'Xqcisls' (Qualcomm uC Scaled Load Store Extension)
216-
// CHECK-NEXT: xqcisync 0.2 'Xqcisync' (Qualcomm uC Sync Delay Extension)
217216
// CHECK-NEXT: xrivosvisni 0.1 'XRivosVisni' (Rivos Vector Integer Small New)
218217
// CHECK-NEXT: xrivosvizip 0.1 'XRivosVizip' (Rivos Vector Register Zips)
219218
// CHECK-EMPTY:

llvm/docs/RISCVUsage.rst

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -485,9 +485,6 @@ The current vendor extensions supported are:
485485
``experimental-Xqcisls``
486486
LLVM implements `version 0.2 of the Qualcomm uC Scaled Load Store extension specification <https://github.com/quic/riscv-unified-db/releases/latest>`__ by Qualcomm. All instructions are prefixed with `qc.` as described in the specification. These instructions are only available for riscv32.
487487

488-
``experimental-Xqcisync``
489-
LLVM implements `version 0.2 of the Qualcomm uC Sync Delay extension specification <https://github.com/quic/riscv-unified-db/releases/latest>`__ by Qualcomm. All instructions are prefixed with `qc.` as described in the specification. These instructions are only available for riscv32.
490-
491488
``Xmipscmove``
492489
LLVM implements conditional move for the `p8700 processor <https://mips.com/products/hardware/p8700/>` by MIPS.
493490

llvm/docs/ReleaseNotes.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,6 @@ Changes to the RISC-V Backend
140140
* Added non-quadratic ``log-vrgather`` cost model for ``vrgather.vv`` instruction
141141
* Adds experimental assembler support for the Qualcomm uC 'Xqcisim` (Simulation Hint)
142142
extension.
143-
* Adds experimental assembler support for the Qualcomm uC 'Xqcisync` (Sync Delay)
144-
extension.
145143
* Adds assembler support for the 'Zilsd` (Load/Store Pair Instructions)
146144
extension.
147145
* Adds assembler support for the 'Zclsd` (Compressed Load/Store Pair Instructions)

llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -772,18 +772,6 @@ struct RISCVOperand final : public MCParsedAsmOperand {
772772
VK == RISCVMCExpr::VK_None;
773773
}
774774

775-
bool isUImm5Slist() const {
776-
if (!isImm())
777-
return false;
778-
RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_None;
779-
int64_t Imm;
780-
bool IsConstantImm = evaluateConstantImm(getImm(), Imm, VK);
781-
return IsConstantImm &&
782-
((Imm == 0) || (Imm == 1) || (Imm == 2) || (Imm == 4) ||
783-
(Imm == 8) || (Imm == 16) || (Imm == 15) || (Imm == 31)) &&
784-
VK == RISCVMCExpr::VK_None;
785-
}
786-
787775
bool isUImm8GE32() const {
788776
int64_t Imm;
789777
RISCVMCExpr::Specifier VK = RISCVMCExpr::VK_None;
@@ -1667,11 +1655,6 @@ bool RISCVAsmParser::matchAndEmitInstruction(SMLoc IDLoc, unsigned &Opcode,
16671655
return generateImmOutOfRangeError(Operands, ErrorInfo, 1, (1 << 5));
16681656
case Match_InvalidUImm5GE6Plus1:
16691657
return generateImmOutOfRangeError(Operands, ErrorInfo, 6, (1 << 5));
1670-
case Match_InvalidUImm5Slist: {
1671-
SMLoc ErrorLoc = ((RISCVOperand &)*Operands[ErrorInfo]).getStartLoc();
1672-
return Error(ErrorLoc,
1673-
"immediate must be one of: 0, 1, 2, 4, 8, 15, 16, 31");
1674-
}
16751658
case Match_InvalidUImm6:
16761659
return generateImmOutOfRangeError(Operands, ErrorInfo, 0, (1 << 6) - 1);
16771660
case Match_InvalidUImm7:

llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -370,15 +370,6 @@ static DecodeStatus decodeUImmPlus1OperandGE(MCInst &Inst, uint32_t Imm,
370370
return MCDisassembler::Success;
371371
}
372372

373-
static DecodeStatus decodeUImmSlistOperand(MCInst &Inst, uint32_t Imm,
374-
int64_t Address,
375-
const MCDisassembler *Decoder) {
376-
assert(isUInt<3>(Imm) && "Invalid Slist immediate");
377-
const uint8_t Slist[] = {0, 1, 2, 4, 8, 16, 15, 31};
378-
Inst.addOperand(MCOperand::createImm(Slist[Imm]));
379-
return MCDisassembler::Success;
380-
}
381-
382373
static DecodeStatus decodeUImmLog2XLenOperand(MCInst &Inst, uint32_t Imm,
383374
int64_t Address,
384375
const MCDisassembler *Decoder) {
@@ -672,15 +663,14 @@ static constexpr FeatureBitset XRivosFeatureGroup = {
672663
};
673664

674665
static constexpr FeatureBitset XqciFeatureGroup = {
675-
RISCV::FeatureVendorXqcia, RISCV::FeatureVendorXqciac,
676-
RISCV::FeatureVendorXqcibi, RISCV::FeatureVendorXqcibm,
677-
RISCV::FeatureVendorXqcicli, RISCV::FeatureVendorXqcicm,
678-
RISCV::FeatureVendorXqcics, RISCV::FeatureVendorXqcicsr,
679-
RISCV::FeatureVendorXqciint, RISCV::FeatureVendorXqcilb,
680-
RISCV::FeatureVendorXqcili, RISCV::FeatureVendorXqcilia,
681-
RISCV::FeatureVendorXqcilo, RISCV::FeatureVendorXqcilsm,
682-
RISCV::FeatureVendorXqcisim, RISCV::FeatureVendorXqcisls,
683-
RISCV::FeatureVendorXqcisync,
666+
RISCV::FeatureVendorXqcia, RISCV::FeatureVendorXqciac,
667+
RISCV::FeatureVendorXqcibi, RISCV::FeatureVendorXqcibm,
668+
RISCV::FeatureVendorXqcicli, RISCV::FeatureVendorXqcicm,
669+
RISCV::FeatureVendorXqcics, RISCV::FeatureVendorXqcicsr,
670+
RISCV::FeatureVendorXqciint, RISCV::FeatureVendorXqcilb,
671+
RISCV::FeatureVendorXqcili, RISCV::FeatureVendorXqcilia,
672+
RISCV::FeatureVendorXqcilo, RISCV::FeatureVendorXqcilsm,
673+
RISCV::FeatureVendorXqcisim, RISCV::FeatureVendorXqcisls,
684674
};
685675

686676
static constexpr FeatureBitset XSfVectorGroup = {

llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,6 @@ enum OperandType : unsigned {
299299
OPERAND_UIMM5_PLUS1,
300300
OPERAND_UIMM5_GE6_PLUS1,
301301
OPERAND_UIMM5_LSB0,
302-
OPERAND_UIMM5_SLIST,
303302
OPERAND_UIMM6,
304303
OPERAND_UIMM6_LSB0,
305304
OPERAND_UIMM7,

llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCCodeEmitter.cpp

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,6 @@ class RISCVMCCodeEmitter : public MCCodeEmitter {
8484
SmallVectorImpl<MCFixup> &Fixups,
8585
const MCSubtargetInfo &STI) const;
8686

87-
uint64_t getImmOpValueSlist(const MCInst &MI, unsigned OpNo,
88-
SmallVectorImpl<MCFixup> &Fixups,
89-
const MCSubtargetInfo &STI) const;
90-
9187
uint64_t getImmOpValueAsr1(const MCInst &MI, unsigned OpNo,
9288
SmallVectorImpl<MCFixup> &Fixups,
9389
const MCSubtargetInfo &STI) const;
@@ -408,36 +404,6 @@ RISCVMCCodeEmitter::getImmOpValueMinus1(const MCInst &MI, unsigned OpNo,
408404
return 0;
409405
}
410406

411-
uint64_t
412-
RISCVMCCodeEmitter::getImmOpValueSlist(const MCInst &MI, unsigned OpNo,
413-
SmallVectorImpl<MCFixup> &Fixups,
414-
const MCSubtargetInfo &STI) const {
415-
const MCOperand &MO = MI.getOperand(OpNo);
416-
assert(MO.isImm() && "Slist operand must be immediate");
417-
418-
uint64_t Res = MO.getImm();
419-
switch (Res) {
420-
case 0:
421-
return 0;
422-
case 1:
423-
return 1;
424-
case 2:
425-
return 2;
426-
case 4:
427-
return 3;
428-
case 8:
429-
return 4;
430-
case 16:
431-
return 5;
432-
case 15:
433-
return 6;
434-
case 31:
435-
return 7;
436-
default:
437-
llvm_unreachable("Unhandled Slist value!");
438-
}
439-
}
440-
441407
uint64_t
442408
RISCVMCCodeEmitter::getImmOpValueAsr1(const MCInst &MI, unsigned OpNo,
443409
SmallVectorImpl<MCFixup> &Fixups,

llvm/lib/Target/RISCV/RISCVFeatures.td

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1448,14 +1448,6 @@ def HasVendorXqcisim
14481448
AssemblerPredicate<(all_of FeatureVendorXqcisim),
14491449
"'Xqcisim' (Qualcomm uC Simulation Hint Extension)">;
14501450

1451-
def FeatureVendorXqcisync
1452-
: RISCVExperimentalExtension<0, 2, "Qualcomm uC Sync Delay Extension",
1453-
[FeatureStdExtZca]>;
1454-
def HasVendorXqcisync
1455-
: Predicate<"Subtarget->hasVendorXqcisync()">,
1456-
AssemblerPredicate<(all_of FeatureVendorXqcisync),
1457-
"'Xqcisync' (Qualcomm uC Sync Delay Extension)">;
1458-
14591451
// Rivos Extension(s)
14601452

14611453
def FeatureVendorXRivosVisni

llvm/lib/Target/RISCV/RISCVInstrInfoXqci.td

Lines changed: 0 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -50,21 +50,6 @@ def uimm5ge6_plus1 : RISCVOp<XLenVT>, ImmLeaf<XLenVT,
5050
let OperandType = "OPERAND_UIMM5_GE6_PLUS1";
5151
}
5252

53-
def uimm5slist : RISCVOp<XLenVT>, ImmLeaf<XLenVT,
54-
[{return ((Imm == 0) ||
55-
(Imm == 1) ||
56-
(Imm == 2) ||
57-
(Imm == 4) ||
58-
(Imm == 8) ||
59-
(Imm == 16) ||
60-
(Imm == 15) ||
61-
(Imm == 31));}]> {
62-
let ParserMatchClass = UImmAsmOperand<5, "Slist">;
63-
let EncoderMethod = "getImmOpValueSlist";
64-
let DecoderMethod = "decodeUImmSlistOperand";
65-
let OperandType = "OPERAND_UIMM5_SLIST";
66-
}
67-
6853
def uimm10 : RISCVUImmLeafOp<10>;
6954

7055
def uimm11 : RISCVUImmLeafOp<11>;
@@ -379,27 +364,6 @@ class QCISim_RS1<bits<4> imm11_8, string opcodestr>
379364
let imm12 = {imm11_8, 0b00000000};
380365
}
381366

382-
let mayLoad = 0, mayStore = 0, hasSideEffects = 1 in
383-
class QCISync_UIMM5<bits<4> imm11_8, string opcodestr>
384-
: RVInstI<0b011, OPC_OP_IMM, (outs), (ins uimm5:$imm5), opcodestr, "$imm5">
385-
{
386-
bits<5> imm5;
387-
388-
let rs1 = 0;
389-
let rd = 0;
390-
let imm12 = {imm11_8, 0b000, imm5};
391-
}
392-
393-
let mayLoad = 0, mayStore = 0, hasSideEffects = 1 in
394-
class QCIRVInst16CBSYNC<bits<3> imm5_func2, string OpcodeStr>
395-
: RVInst16CB<0b100, 0b01, (outs), (ins uimm5slist:$slist), OpcodeStr, "$slist"> {
396-
bits<3> slist;
397-
398-
let Inst{6-2} = 0;
399-
let Inst{9-7} = slist;
400-
let Inst{12-10} = imm5_func2;
401-
}
402-
403367
class QCIRVInstEIBase<bits<3> funct3, bits<2> funct2, dag outs,
404368
dag ins, string opcodestr, string argstr>
405369
: RVInst48<outs, ins, opcodestr, argstr, [], InstFormatOther> {
@@ -789,27 +753,6 @@ let hasSideEffects = 0, mayLoad = 0, mayStore = 0 in {
789753
} // hasSideEffects = 0, mayLoad = 0, mayStore = 0
790754
} // Predicates = [HasVendorXqcilia, IsRV32]
791755

792-
let Predicates = [HasVendorXqcisync, IsRV32] in {
793-
def QC_SYNC : QCISync_UIMM5<0b0001, "qc.sync">;
794-
def QC_SYNCR : QCISync_UIMM5<0b0010, "qc.syncr">;
795-
def QC_SYNCWF : QCISync_UIMM5<0b0100, "qc.syncwf">;
796-
def QC_SYNCWL : QCISync_UIMM5<0b1000, "qc.syncwl">;
797-
798-
def QC_C_SYNC : QCIRVInst16CBSYNC<0b000, "qc.c.sync">;
799-
def QC_C_SYNCR : QCIRVInst16CBSYNC<0b001, "qc.c.syncr">;
800-
def QC_C_SYNCWF : QCIRVInst16CBSYNC<0b100, "qc.c.syncwf">;
801-
def QC_C_SYNCWL : QCIRVInst16CBSYNC<0b101, "qc.c.syncwl">;
802-
803-
let mayLoad = 0, mayStore = 0, hasSideEffects = 1 in
804-
def QC_C_DELAY : RVInst16CI<0b000, 0b10, (outs),
805-
(ins uimm5nonzero:$imm),
806-
"qc.c.delay", "$imm"> {
807-
let Inst{12} = 0;
808-
let Inst{11-7} = 0;
809-
let Inst{6-2} = imm{4-0};
810-
}
811-
} // Predicates = [HasVendorXqcisync, IsRV32]
812-
813756
let Predicates = [HasVendorXqcisim, IsRV32] in {
814757
let mayLoad = 0, mayStore = 0, hasSideEffects = 1 in {
815758
def QC_PSYSCALLI : RVInstI<0b010, OPC_OP_IMM, (outs), (ins uimm10:$imm10),

llvm/lib/TargetParser/RISCVISAInfo.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -744,10 +744,10 @@ Error RISCVISAInfo::checkDependency() {
744744
bool HasXqccmp = Exts.count("xqccmp") != 0;
745745

746746
static constexpr StringLiteral XqciExts[] = {
747-
{"xqcia"}, {"xqciac"}, {"xqcibi"}, {"xqcibm"}, {"xqcicli"},
748-
{"xqcicm"}, {"xqcics"}, {"xqcicsr"}, {"xqciint"}, {"xqcilb"},
749-
{"xqcili"}, {"xqcilia"}, {"xqcilo"}, {"xqcilsm"}, {"xqcisim"},
750-
{"xqcisls"}, {"xqcisync"}};
747+
{"xqcia"}, {"xqciac"}, {"xqcibi"}, {"xqcibm"},
748+
{"xqcicli"}, {"xqcicm"}, {"xqcics"}, {"xqcicsr"},
749+
{"xqciint"}, {"xqcilb"}, {"xqcili"}, {"xqcilia"},
750+
{"xqcilo"}, {"xqcilsm"}, {"xqcisim"}, {"xqcisls"}};
751751
static constexpr StringLiteral ZcdOverlaps[] = {
752752
{"zcmt"}, {"zcmp"}, {"xqccmp"}, {"xqciac"}, {"xqcicm"}};
753753

llvm/test/CodeGen/RISCV/attributes.ll

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@
9797
; RUN: llc -mtriple=riscv32 -mattr=+experimental-xqcilo %s -o - | FileCheck --check-prefix=RV32XQCILO %s
9898
; RUN: llc -mtriple=riscv32 -mattr=+experimental-xqcilsm %s -o - | FileCheck --check-prefix=RV32XQCILSM %s
9999
; RUN: llc -mtriple=riscv32 -mattr=+experimental-xqcisim %s -o - | FileCheck --check-prefix=RV32XQCISIM %s
100-
; RUN: llc -mtriple=riscv32 -mattr=+experimental-xqcisync %s -o - | FileCheck --check-prefix=RV32XQCISYNC %s
101100
; RUN: llc -mtriple=riscv32 -mattr=+experimental-xqcisls %s -o - | FileCheck --check-prefix=RV32XQCISLS %s
102101
; RUN: llc -mtriple=riscv32 -mattr=+zaamo %s -o - | FileCheck --check-prefix=RV32ZAAMO %s
103102
; RUN: llc -mtriple=riscv32 -mattr=+zalrsc %s -o - | FileCheck --check-prefix=RV32ZALRSC %s
@@ -428,7 +427,6 @@
428427
; RV32XQCILO: .attribute 5, "rv32i2p1_zca1p0_xqcilo0p2"
429428
; RV32XQCILSM: .attribute 5, "rv32i2p1_xqcilsm0p2"
430429
; RV32XQCISIM: attribute 5, "rv32i2p1_zca1p0_xqcisim0p2"
431-
; RV32XQCISYNC: attribute 5, "rv32i2p1_zca1p0_xqcisync0p2"
432430
; RV32XQCISLS: .attribute 5, "rv32i2p1_xqcisls0p2"
433431
; RV32ZAAMO: .attribute 5, "rv32i2p1_zaamo1p0"
434432
; RV32ZALRSC: .attribute 5, "rv32i2p1_zalrsc1p0"

llvm/test/MC/RISCV/xqcisync-invalid.s

Lines changed: 0 additions & 121 deletions
This file was deleted.

0 commit comments

Comments
 (0)