https://llvm.org/bugs/show_bug.cgi?id=29037
Bug ID: 29037 Summary: LLC: Frame Pointer Elim. optimization causes a stack crash on Sandybridge. Product: tools Version: trunk Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: llc Assignee: unassignedb...@nondot.org Reporter: shishpanov2...@yandex.ru CC: llvm-bugs@lists.llvm.org Classification: Unclassified Created attachment 16986 --> https://llvm.org/bugs/attachment.cgi?id=16986&action=edit Source IR Launch commands: llc -mcpu=sandybridge input.ll -o output.asm -O1 ; clang++ test_static.cpp output.asm -o output.run ; ./output.run If I run LLC with -O0 instead of -O1 or run it with -disable-fp-elim, the function f_fu() works properly. If I run it with -O1, I have seg. fault. As I can see, the problem is in the last VPEXTRD instruction in f_fu(), which overrides and damages the pointer's value for the final result on the stack. In addition, if I skip " TFI.orderFrameObjects(Fn, ObjectsToAllocate);" in lib/CodeGen/PrologEpilogInserter.cpp:calculateFrameObjectOffsets(MachineFunction &Fn) with -O1 only, then it works. LLVM rev. 277592. -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs