forked from OSchip/llvm-project
Remove some redundant code from r290372 and improve a comment.
llvm-svn: 365741
This commit is contained in:
parent
85ad78b1cf
commit
c1b7db9eda
|
@ -3655,13 +3655,11 @@ SDValue AMDGPUTargetLowering::performSelectCombine(SDNode *N,
|
|||
|
||||
if (Cond.hasOneUse()) { // TODO: Look for multiple select uses.
|
||||
SelectionDAG &DAG = DCI.DAG;
|
||||
if ((DAG.isConstantValueOfAnyType(True) ||
|
||||
DAG.isConstantValueOfAnyType(True)) &&
|
||||
(!DAG.isConstantValueOfAnyType(False) &&
|
||||
!DAG.isConstantValueOfAnyType(False))) {
|
||||
if (DAG.isConstantValueOfAnyType(True) &&
|
||||
!DAG.isConstantValueOfAnyType(False)) {
|
||||
// Swap cmp + select pair to move constant to false input.
|
||||
// This will allow using VOPC cndmasks more often.
|
||||
// select (setcc x, y), k, x -> select (setcc y, x) x, x
|
||||
// select (setcc x, y), k, x -> select (setccinv x, y), x, k
|
||||
|
||||
SDLoc SL(N);
|
||||
ISD::CondCode NewCC = getSetCCInverse(cast<CondCodeSDNode>(CC)->get(),
|
||||
|
|
Loading…
Reference in New Issue