[llvm] r310372 - [DAGCombiner] simplifyShuffleMask - handle UNDEF inputs from shuffles as well as BUILD_VECTOR

Bill Seurer via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 11 06:42:41 PDT 2017


Thank you!  If you need any assistance from me just let me know.

On 08/11/2017 03:39 AM, Simon Pilgrim wrote:
> Thanks for the report, I’ve disabled support in rL310699 until I can solve the problem.
> 
>> On 10 Aug 2017, at 17:05, Bill Seurer <seurer at linux.vnet.ibm.com> wrote:
>>
>> After this patch there are 4 test cases that cause clang to hang (or possibly run a REALLY long time) on powerpc64 (BE only) in the llvm-test-suite tests.  You can see the initial failure in the buildbots here:
>>
>> http://lab.llvm.org:8011/builders/clang-ppc64be-linux-lnt/builds/7027
>>
>> Specificially:
>>
>> http://lab.llvm.org:8011/builders/clang-ppc64be-linux-lnt/builds/7027/steps/test-suite/logs/test.log
>>
>> (search for "FAIL:")
>>
>> --- Tested: 2565 tests --
>> FAIL: SingleSource/UnitTests/Vector/build.compile_time (1 of 2565)
>> FAIL: SingleSource/UnitTests/Vector/simple.compile_time (2 of 2565)
>> FAIL: SingleSource/UnitTests/Vector/build.execution_time (514 of 2565)
>> FAIL: SingleSource/UnitTests/Vector/simple.execution_time (515 of 2565)
>>
>>
>>
>>  From letting it run in the debugger a while and then checking where it was at it a few tines it appears to be hanging in DAGCombiner::Run in the while loop (line 1372 in my copy of lib/CodeGen/SelectionDAG/DAGCombiner.cpp).
>>
>> . . .
>>   // While the worklist isn't empty, find a node and try to combine it.
>>   while (!WorklistMap.empty()) {
>> . . .
>>
>>
>>
>> Some examples from llvm-test-suite/SingleSource/UnitTests/Vector/build.c
>> (which is a small test case):
>>
>>
>> Program received signal SIGINT, Interrupt.
>> llvm::TypedTrackingMDRef<llvm::MDNode>::TypedTrackingMDRef (this=0x3fffffff8d08, X=...) at /home/seurer/llvm/llvm-test3/include/llvm/IR/TrackingMDRef.h:115
>> 115	  TypedTrackingMDRef(const TypedTrackingMDRef &X) : Ref(X.Ref) {}
>> Missing separate debuginfos, use: debuginfo-install ncurses-libs-5.9-13.20130511.el7.ppc64 zlib-1.2.7-17.el7.ppc64
>> (gdb) where
>> #0  llvm::TypedTrackingMDRef<llvm::MDNode>::TypedTrackingMDRef (this=0x3fffffff8d08, X=...) at /home/seurer/llvm/llvm-test3/include/llvm/IR/TrackingMDRef.h:115
>> #1  0x0000000011642af8 in llvm::DebugLoc::DebugLoc (this=0x3fffffff8d08) at /home/seurer/llvm/llvm-test3/include/llvm/IR/DebugLoc.h:34
>> #2  0x00000000116e8e4c in llvm::SDLoc::SDLoc (this=0x3fffffff8d08, N=0x1cba89f0) at /home/seurer/llvm/llvm-test3/include/llvm/CodeGen/SelectionDAGNodes.h:1012
>> #3  0x00000000116e8f24 in llvm::SDLoc::SDLoc (this=0x3fffffff8d08, V=...) at /home/seurer/llvm/llvm-test3/include/llvm/CodeGen/SelectionDAGNodes.h:1013
>> #4  0x00000000152216d0 in simplifyShuffleOperandRecursively (UsedElements=..., V=..., DAG=...) at /home/seurer/llvm/llvm-test3/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:15031
>> #5  0x000000001522208c in simplifyShuffleOperands (SVN=0x1cbb3368, N0=..., N1=..., DAG=...) at /home/seurer/llvm/llvm-test3/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:15107
>> #6  0x00000000152250b4 in (anonymous namespace)::DAGCombiner::visitVECTOR_SHUFFLE (this=0x3fffffff9bd0, N=0x1cbb3368)
>>     at /home/seurer/llvm/llvm-test3/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:15559
>> #7  0x00000000151b95e4 in (anonymous namespace)::DAGCombiner::visit (this=0x3fffffff9bd0, N=0x1cbb3368) at /home/seurer/llvm/llvm-test3/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1554
>> #8  0x00000000151b9730 in (anonymous namespace)::DAGCombiner::combine (this=0x3fffffff9bd0, N=0x1cbb3368) at /home/seurer/llvm/llvm-test3/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1568
>> #9  0x00000000151b8620 in (anonymous namespace)::DAGCombiner::Run (this=0x3fffffff9bd0, AtLevel=llvm::AfterLegalizeDAG)
>>     at /home/seurer/llvm/llvm-test3/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1416
>> #10 0x0000000015230514 in llvm::SelectionDAG::Combine (this=0x1cb33150, Level=llvm::AfterLegalizeDAG, AA=0x1cb9ed70, OptLevel=llvm::CodeGenOpt::Aggressive)
>>     at /home/seurer/llvm/llvm-test3/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:17235
>> . . .
>>
>> Program received signal SIGINT, Interrupt.
>> llvm::MVT::getVectorNumElements (this=0x3fffffff8bc0) at /home/seurer/llvm/llvm-test3/include/llvm/CodeGen/MachineValueType.h:513
>> 513	    unsigned getVectorNumElements() const {
>> (gdb) where
>> #0  llvm::MVT::getVectorNumElements (this=0x3fffffff8bc0) at /home/seurer/llvm/llvm-test3/include/llvm/CodeGen/MachineValueType.h:513
>> #1  0x00000000116e7f34 in llvm::EVT::getVectorNumElements (this=0x3fffffff8bc0) at /home/seurer/llvm/llvm-test3/include/llvm/CodeGen/ValueTypes.h:276
>> #2  0x0000000011d65b74 in llvm::ShuffleVectorSDNode::getMaskElt (this=0x1cbb3368, Idx=6) at /home/seurer/llvm/llvm-test3/include/llvm/CodeGen/SelectionDAGNodes.h:1377
>> #3  0x0000000015304e8c in AddNodeIDCustom (ID=..., N=0x1cbb3368) at /home/seurer/llvm/llvm-test3/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:510
>> #4  0x000000001530503c in AddNodeIDNode (ID=..., N=0x1cbb3368) at /home/seurer/llvm/llvm-test3/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:538
>> #5  0x0000000015334ac0 in llvm::SDNode::Profile (this=0x1cbb3368, ID=...) at /home/seurer/llvm/llvm-test3/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:7443
>> #6  0x000000001535c324 in llvm::DefaultFoldingSetTrait<llvm::SDNode>::Profile (X=..., ID=...) at /home/seurer/llvm/llvm-test3/include/llvm/ADT/FoldingSet.h:230
>> #7  0x000000001535c1fc in llvm::FoldingSet<llvm::SDNode>::GetNodeProfile (this=0x1cb33298, N=0x1cbb3368, ID=...) at /home/seurer/llvm/llvm-test3/include/llvm/ADT/FoldingSet.h:487
>> #8  0x000000001411acf8 in llvm::FoldingSetBase::GetOrInsertNode (this=0x1cb33298, N=0x1cbb3368) at /home/seurer/llvm/llvm-test3/lib/Support/FoldingSet.cpp:422
>> #9  0x0000000015343c10 in llvm::FoldingSetImpl<llvm::SDNode>::GetOrInsertNode (this=0x1cb33298, N=0x1cbb3368) at /home/seurer/llvm/llvm-test3/include/llvm/ADT/FoldingSet.h:444
>> #10 0x0000000015306650 in llvm::SelectionDAG::AddModifiedNodeToCSEMaps (this=0x1cb33150, N=0x1cbb3368) at /home/seurer/llvm/llvm-test3/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:800
>> #11 0x0000000015332024 in llvm::SelectionDAG::ReplaceAllUsesWith (this=0x1cb33150, FromN=..., To=...) at /home/seurer/llvm/llvm-test3/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:6952
>> #12 0x0000000015268fdc in (anonymous namespace)::SelectionDAGLegalize::ReplaceNode (this=0x3fffffff97f8, Old=..., New=...)
>>     at /home/seurer/llvm/llvm-test3/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:189
>> #13 0x0000000015270310 in (anonymous namespace)::SelectionDAGLegalize::LegalizeOp (this=0x3fffffff97f8, Node=0x1cba89f0)
>>     at /home/seurer/llvm/llvm-test3/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1164
>> #14 0x000000001528d8d8 in llvm::SelectionDAG::LegalizeOp (this=0x1cb33150, N=0x1cba89f0, UpdatedNodes=...) at /home/seurer/llvm/llvm-test3/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:4644
>> #15 0x00000000151b83b8 in (anonymous namespace)::DAGCombiner::Run (this=0x3fffffff9bd0, AtLevel=llvm::AfterLegalizeDAG)
>>     at /home/seurer/llvm/llvm-test3/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1396
>> #16 0x0000000015230514 in llvm::SelectionDAG::Combine (this=0x1cb33150, Level=llvm::AfterLegalizeDAG, AA=0x1cb9ed70, OptLevel=llvm::CodeGenOpt::Aggressive)
>>     at /home/seurer/llvm/llvm-test3/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:17235
>> . . .
>>
> 


-- 

-Bill Seurer



More information about the llvm-commits mailing list