Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions include/QuantumSSAOps.td
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,8 @@ def ExtractOp : QuantumSSA_Op<"extract", [NoSideEffect]> {

// bounds checking (if possible)
if(this->const_idx()) {
for (auto idxAttr : *this->const_idx()) {
auto idxs = *this->const_idx();
for (auto idxAttr : idxs) {
int64_t idx = idxAttr.dyn_cast<IntegerAttr>().getInt();
if (idx >= regsize)
return this->emitOpError() << "detected index value out of bounds, idx: "
Expand Down Expand Up @@ -997,7 +998,7 @@ def ApplyCircOp : QuantumSSA_Op<"apply"> {
}];

let extraClassDeclaration = [{
static TypeRange filterRegSize(TypeRange types, MLIRContext *ctx) {
static llvm::SmallVector<Type, 8> filterRegSize(TypeRange types, MLIRContext *ctx) {
Type rstate = RstateType::get(ctx, llvm::None);
llvm::SmallVector<Type, 8> filteredTypes;
filteredTypes.reserve(types.size());
Expand Down