[NFC][SCEVExpander] `CmpSelCost`: use the cost of the expression, not operand
authorRoman Lebedev <lebedev.ri@gmail.com>
Sun, 22 Jan 2023 14:27:17 +0000 (17:27 +0300)
committerRoman Lebedev <lebedev.ri@gmail.com>
Sun, 22 Jan 2023 14:48:49 +0000 (17:48 +0300)
commit3c560dd0ae676e28a2560b1041c9411908e999a5
treedad0e80ed11b86c4db6c2230a560e794bc2c9251
parent418f780f1f882dbe4f72fcbd3b24b2ce34520557
[NFC][SCEVExpander] `CmpSelCost`: use the cost of the expression, not operand

Currently, for all invocations, it's equivalent, since that is literally
how `SCEVMinMaxExpr::getType()` is defined. But for e.g. `select`,
we'll want to ask about the hand type, and not the type of the operand
that happens to be first.
llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp