[Mlir-commits] [mlir] [mlir][arith] Fix SelectOp unsafe int range inference with uninitialized range case (PR #173716)

Longsheng Du llvmlistbot at llvm.org
Sun Jan 11 04:23:01 PST 2026


LongshengDu wrote:

> I think, overall, between this and some of the bugs we've seen around unstructured control flow ... and so that we can handle `poison` more accurately, we could do with an "unknown" state on top of lattice-level uninitialized (which has specific meanings in the dataflow analysis framework). Then, we'd know that select(x, unknown) is x.

I think select(x, unknown) should be `unknown`, other than that I agree, an unknown state is necessary if we want to keep the current logic, this would align with the [dataflow doc](https://github.com/llvm/llvm-project/blob/main/mlir/docs/Tutorials/DataFlowAnalysis.md) as well.

https://github.com/llvm/llvm-project/pull/173716


More information about the Mlir-commits mailing list