Question: is `add nuw i32 -1, 1` a poison value?

is add nuw i32 -1, 1 a poison value because if -1 is interpreted as an unsigned (UINT_MAX) then the operation exhibits an unsigned overflow?

When I run the following through opt -O2:

define dso_local noundef signext i32 @main() #0 {
entry:
  %add = add nuw i32 -1, 1
  store i32 %add, i32* @x, align 4
  ret i32 %add
}

I get

define dso_local noundef signext i32 @main() #0 {
entry:
  store i32 0, i32* @x, align 4
  ret i32 0
}

yes the result is poison, but poison can be refined by any constant such as 0, so opt is totally correct here.

thanks