summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorStanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com>2019-02-26 20:56:25 +0000
committerStanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com>2019-02-26 20:56:25 +0000
commitda1628eb679d2921e5d683e51cc9ecf6e5750295 (patch)
treeb925208af4615754ff253253172bae28cb67d0af /llvm/lib
parentddc181d2561b14b95e7b3afbacaa0e55d16ea733 (diff)
downloadbcm5719-llvm-da1628eb679d2921e5d683e51cc9ecf6e5750295.tar.gz
bcm5719-llvm-da1628eb679d2921e5d683e51cc9ecf6e5750295.zip
[AMDGPU] Fixed hang during DAG combine
SITargetLowering::reassociateScalarOps() does not touch constants so that DAGCombiner::ReassociateOps() does not revert the combine. However a global address is not a ConstantSDNode. Switched to the method used by DAGCombiner::ReassociateOps() itself to detect constants. Differential Revision: https://reviews.llvm.org/D58695 llvm-svn: 354926
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/AMDGPU/SIISelLowering.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Target/AMDGPU/SIISelLowering.cpp b/llvm/lib/Target/AMDGPU/SIISelLowering.cpp
index 83d7711e801..adb9ed41662 100644
--- a/llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+++ b/llvm/lib/Target/AMDGPU/SIISelLowering.cpp
@@ -8477,7 +8477,8 @@ SDValue SITargetLowering::reassociateScalarOps(SDNode *N,
// If either operand is constant this will conflict with
// DAGCombiner::ReassociateOps().
- if (isa<ConstantSDNode>(Op0) || isa<ConstantSDNode>(Op1))
+ if (DAG.isConstantIntBuildVectorOrConstantInt(Op0) ||
+ DAG.isConstantIntBuildVectorOrConstantInt(Op1))
return SDValue();
SDLoc SL(N);
OpenPOWER on IntegriCloud