llvm / clangir

A new (MLIR based) high-level IR for clang.
https://clangir.org
Other
307 stars 84 forks source link

[CIR][CodeGen] Fix missing 'nsw' flag in add, sub, and mul in binop operator #677

Closed mingshi2333 closed 1 week ago

mingshi2333 commented 3 weeks ago

This PR is to fix the missing nsw flag in issue #664 regarding add, mul arithmetic operations. there is also a problem with unary operations such as Inc ,Dec,Plus,Minus and Not . which should also have 'nsw' flag example. This part should need to be fixed through lowering.