Commit 4992e38a authored by Nguyen, Thien Minh's avatar Nguyen, Thien Minh
Browse files


While having an LLVM build with assert on, fixing those asserts:

- extraneous eraseOp

- unused variable which is actually an error (cannot get Int/Float bit width of a memref type)

Signed-off-by: default avatarThien Nguyen <nguyentm@ornl.gov>
parent 40d72743
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -70,7 +70,7 @@ antlrcpp::Any qasm3_expression_generator::visitTerminal(
      // location)); number_value.dump(); auto idx_minus_1 =
      // builder.create<mlir::SubIOp>(location, current_value,
      // get_or_create_constant_integer_value(1, location));
      auto bw = indexed_variable_value.getType().getIntOrFloatBitWidth();
      // auto bw = indexed_variable_value.getType().getIntOrFloatBitWidth();
      
      // NOTE: UnsignedShiftRightOp (std dialect) expects operands of type "signless-integer-like"
      // i.e. although it treats the operants as unsigned, they must be of type signless (int not uint). 
+0 −1
Original line number Diff line number Diff line
@@ -76,7 +76,6 @@ QallocOpLowering::matchAndRewrite(Operation *op, ArrayRef<Value> operands,

  // Remove the old QuantumDialect QallocOp
  rewriter.replaceOp(op, qbit_array);
  rewriter.eraseOp(op);
  // Save the qubit array variable to the symbol table
  variables.insert({qreg_name, qbit_array});