[llvm-bugs] [Bug 33494] New: SelectionDAGISel::CodeGenAndEmitDAG takes 3 minutes to compile 11 lines of C++,

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Jun 17 11:17:16 PDT 2017


https://bugs.llvm.org/show_bug.cgi?id=33494

            Bug ID: 33494
           Summary: SelectionDAGISel::CodeGenAndEmitDAG takes 3 minutes to
                    compile 11 lines of C++,
           Product: new-bugs
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: kcc at google.com
                CC: llvm-bugs at lists.llvm.org

r305575, x86_64 linux


void foo(int *a) {
while (a[56]){
a[0]=(a[0]+(a[0]+(a[0]+(a[0]>=1))));
while (a[0]){
a[0]=(a[0]+(1048576));
a[8]=(((((((((((((a[0]+a[0])*(((((a[0]+a[0])*a[0])*a[0])*a[0])*a[0]))*a[0])*(((((a[0]+a[0])*a[0])*a[0])*a[0])*a[0]))*a[0])*a[0])*a[0])*a[0])*a[0])*a[0])*a[0])+((a[0]+1)+(0)))+a[8]);
a[0]=(a[0]+(30));
}
}
}


clang -cc1 -triple x86_64-unknown-linux-gnu t.cc -O2  -emit-obj

# finishes in 3 minutes

#0  0x00000000023c2163 in (anonymous
namespace)::ScheduleDAGRRList::PickNodeToScheduleBottomUp() ()
#1  0x00000000023bfd77 in (anonymous namespace)::ScheduleDAGRRList::Schedule()
()
#2  0x000000000235075a in llvm::SelectionDAGISel::CodeGenAndEmitDAG() ()
#3  0x000000000234dd4e in
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) ()
#4  0x000000000234a512 in
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) ()
#5  0x00000000010c5d91 in (anonymous
namespace)::X86DAGToDAGISel::runOnMachineFunction(llvm::MachineFunction&) ()
#6  0x000000000149eaf4 in
llvm::MachineFunctionPass::runOnFunction(llvm::Function&) ()
#7  0x00000000017692ff in llvm::FPPassManager::runOnFunction(llvm::Function&)
()

the code is generated by an experimental clang-proto-fuzzer

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170617/5266e5b6/attachment.html>


More information about the llvm-bugs mailing list