diff options
| author | Skrai Pardus <84874402+ashjeong@users.noreply.github.com> | 2025-07-02 06:50:39 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-01 23:50:39 +0200 |
| commit | 5ed852f7f72855710eeff53179e6a6f2271a3c2a (patch) | |
| tree | 681eea90ee62890736e8247b14a47d7e25b9aa0f /llvm/lib/Bitcode/Reader/BitcodeReader.cpp | |
| parent | 863e17a5be77a47eedcd62172b41763783ff183c (diff) | |
[mlir][arith] Add `arith::ConstantIntOp` constructor (#144638)
This PR adds a `build()` constructor for `ConstantIntOp` that takes in
an `APInt`.
Creating an `arith` constant value with an `APInt` currently requires a
structure like the following:
```c
b.create<arith::ConstantOp>(IntegerAttr::get(apintValue, 5));
```
In comparison, the`ConstantFloatOp` already has an `APFloat` constructor
which allows for the following:
```c
b.create<arith::ConstantFloatOp>(floatType, apfloatValue);
```
Thus, intuitively, it makes sense that a similar `ConstantIntOp`
constructor is made for `APInts` like so:
```c
b.create<arith::ConstantIntOp>(intType, apintValue);
```
Depends on https://github.com/llvm/llvm-project/pull/144636
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions
