SCEV of expressions like 'select %cond, %X, %X' should be evaluated as SCEV of '%X'.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
I'm not convinced SCEV is the best place to handle this -- by the time IR hits SCEV select A, B, B should already have been simplified to B. We do not handle "simple" patterns like br (xor C, true), label A, label B for the same reason.
If you *must* do this (and I'm not yet convinced that we must), I'd instead call SimplifyInstruction at a higher level (at createSCEV perhaps).