Skip to content

Commit 08ca93a

Browse files
authored
A couple of bug fixes. (#2598)
Signed-off-by: Eric Schweitz <eschweitz@nvidia.com>
1 parent ab2d01d commit 08ca93a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/Optimizer/CodeGen/ConvertToQIRAPI.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -519,11 +519,12 @@ struct MakeStruqOpRewrite : public OpConversionPattern<quake::MakeStruqOp> {
519519
auto loc = mkstruq.getLoc();
520520
auto *ctx = rewriter.getContext();
521521
auto toTy = getTypeConverter()->convertType(mkstruq.getType());
522-
Value result = rewriter.create<LLVM::UndefOp>(loc, toTy);
522+
Value result = rewriter.create<cudaq::cc::UndefOp>(loc, toTy);
523523
std::int64_t count = 0;
524524
for (auto op : adaptor.getOperands()) {
525525
auto off = DenseI64ArrayAttr::get(ctx, ArrayRef<std::int64_t>{count});
526-
result = rewriter.create<LLVM::InsertValueOp>(loc, toTy, result, op, off);
526+
result =
527+
rewriter.create<cudaq::cc::InsertValueOp>(loc, toTy, result, op, off);
527528
count++;
528529
}
529530
rewriter.replaceOp(mkstruq, result);

lib/Optimizer/Transforms/QuakeAddMetadata.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,7 @@ struct QuakeFunctionAnalysis {
132132
keys.pop_back();
133133
if (isa<cudaq::cc::IfOp, cudaq::cc::ConditionOp, cf::CondBranchOp,
134134
quake::MeasurementInterface, quake::OperatorInterface,
135-
quake::ApplyOp, cudaq::cc::CallCallableOp, func::CallOp,
136-
func::CallIndirectOp>(op)) {
135+
quake::ApplyOp, CallOpInterface>(op)) {
137136
data.hasConditionalsOnMeasure = true;
138137
data.hasQuantumDataflowViaClassical =
139138
isa<quake::MeasurementInterface, quake::OperatorInterface>(op);

0 commit comments

Comments
 (0)