diff options
author | Ivan Butygin <ivan.butygin@gmail.com> | 2024-01-09 23:17:36 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-10 01:17:36 +0300 |
commit | a7262d2d9bee9bdfdbcd03ca27a0128c2e2b1c1a (patch) | |
tree | ccc3b428b430588c4c4e349b6066a258d68f70cb /flang/lib/Frontend/CompilerInvocation.cpp | |
parent | b5d4332286154838557a8ab5c76b794e85d946b3 (diff) | |
download | llvm-a7262d2d9bee9bdfdbcd03ca27a0128c2e2b1c1a.zip llvm-a7262d2d9bee9bdfdbcd03ca27a0128c2e2b1c1a.tar.gz llvm-a7262d2d9bee9bdfdbcd03ca27a0128c2e2b1c1a.tar.bz2 |
[mlir][arith] Add overflow flags support to arith ops (#77211)
Add overflow flags support to the following ops:
* `arith.addi`
* `arith.subi`
* `arith.muli`
Example of new syntax:
```
%res = arith.addi %arg1, %arg2 overflow<nsw> : i64
```
Similar to existing LLVM dialect syntax
```
%res = llvm.add %arg1, %arg2 overflow<nsw> : i64
```
Tablegen canonicalization patterns updated to always drop flags, proper
support with tests will be added later.
Updated LLVMIR translation as part of this commit as it currenly written
in a way that it will crash when new attributes added to arith ops
otherwise.
Discussion
https://discourse.llvm.org/t/rfc-integer-overflow-flags-support-in-arith-dialect/76025
---------
Co-authored-by: Yi Wu <yi.wu2@arm.com>
Diffstat (limited to 'flang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions