summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
diff options
context:
space:
mode:
authorJay Foad <jay.foad@gmail.com>2019-07-11 08:49:52 +0000
committerJay Foad <jay.foad@gmail.com>2019-07-11 08:49:52 +0000
commitc1b7db9edaaffdb31ce4ff53a8a91181daeca80a (patch)
treed8b093c69d62bc8de811597c958fbf069c31661d /llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
parent85ad78b1cfa3932eb658365b74f5b08c25dbfb0e (diff)
downloadbcm5719-llvm-c1b7db9edaaffdb31ce4ff53a8a91181daeca80a.tar.gz
bcm5719-llvm-c1b7db9edaaffdb31ce4ff53a8a91181daeca80a.zip
Remove some redundant code from r290372 and improve a comment.
llvm-svn: 365741
Diffstat (limited to 'llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp')
-rw-r--r--llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp b/llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
index 779166bd059..666d0225561 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
@@ -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(),
OpenPOWER on IntegriCloud