Skip to content

Commit

Permalink
generate IntegerAttr typelessly from APSInt, not from APInt w/BigInt …
Browse files Browse the repository at this point in the history
…type (#52)
  • Loading branch information
mars-risc0 authored Oct 28, 2024
1 parent 3d590be commit 4a22c97
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions zirgen/Dialect/BigInt/Bytecode/decode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include <vector>

#include "zirgen/Dialect/BigInt/IR/BigInt.h"
#include "llvm/ADT/APSInt.h"
#include <vector>

#include "decode.h"

Expand Down Expand Up @@ -107,7 +107,7 @@ mlir::func::FuncOp decode(mlir::ModuleOp module, const Program& prog) {
}
mlir::APInt value(count * 64, mlir::ArrayRef<uint64_t>(words));
mlir::Type t = state.type(op);
auto attr = mlir::IntegerAttr::get(t, value);
auto attr = mlir::IntegerAttr::get(ctx, llvm::APSInt(value));
state.emit(i, builder.create<ConstOp>(loc, t, attr));
} break;
case Op::Add: {
Expand Down

0 comments on commit 4a22c97

Please sign in to comment.