@Meinersbur this is causing a number of polly test changes.
I believe those tests need to be fixed and not updated,
and that probably requires knowing what they are actually testing.
Would you like to help with that?
To support not just booleans we simply only need to sext the condition:
https://alive2.llvm.org/ce/z/EFKLeA
It is contentious whether we should not said condition before or after
the sext, doing that afterwards seems less worse,
but it will depend i guess.
Test llvm/test/Transforms/IndVarSimplify/eliminate-max.ll starts to trigger
assertion after this. While SCEVUnknown was originally created
for an opaque IR Value which was an Instruction, later said Value
was RAUW'd by a constant integer, yet we still have that SCEVUnknown.
Are we missing an invalidation?
It looks like the ranges computed in this file regress. You probably need to update the getRangeViaFactoring() code, which assumes that the selects here will be SCEVUnknowns.