[clang] [CIR] Add inbounds and nuw flags to cir.get_element (PR #234774)
Andy Kaylor via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 4 16:55:47 PST 2026
================
@@ -4248,11 +4272,15 @@ def CIR_GetElementOp : CIR_Op<"get_element", [
let arguments = (ins
Arg<CIR_PtrToArray, "the base address of the array ">:$base,
- Arg<CIR_AnyFundamentalIntType, "the index of the element">:$index
+ Arg<CIR_AnyFundamentalIntType, "the index of the element">:$index,
+ UnitProp:$in_bounds,
----------------
andykaylor wrote:
Did you consider using something equivalent to the LLVM dialect's `GEPNoWrapFlags`? In addition to `inbounds` and `nuw`, they also support `nusw`. I'm not sure when that comes up.
https://github.com/llvm/llvm-project/pull/234774
More information about the cfe-commits
mailing list