[ConstantRange] Fix single bit abs range (PR59887)
For a full range input, we would produce an empty range instead of a full range. The change to the SMin.isNonNegative() branch is an optimality fix, because we should account for the potentially discarded SMin value in the IntMinIsPoison case. Change TestUnaryOpExhaustive to test both 4 and 1 bits, to both cover this specific case in unit tests, and make sure all other unary operations deal with 1-bit inputs correctly. Fixes https://github.com/llvm/llvm-project/issues/59887.
Loading
Please sign in to comment