summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/NVPTX/local-stack-frame.ll
Commit message (Collapse)AuthorAgeFilesLines
* [NVPTX] Move NVPTXPeephole after NVPTXPrologEpilogPassJingyue Wu2015-07-011-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Offset of frame index is calculated by NVPTXPrologEpilogPass. Before that the correct offset of stack objects cannot be obtained, which leads to wrong offset if there are more than 2 frame objects. This patch move NVPTXPeephole after NVPTXPrologEpilogPass. Because the frame index is already replaced by %VRFrame in NVPTXPrologEpilogPass, we check VRFrame register instead, and try to remove the VRFrame if there is no usage after NVPTXPeephole pass. Patched by Xuetian Weng. Test Plan: Strengthened test/CodeGen/NVPTX/local-stack-frame.ll to check the offset calculation based on SP and SPL. Reviewers: jholewinski, jingyue Reviewed By: jingyue Subscribers: jholewinski, llvm-commits Differential Revision: http://reviews.llvm.org/D10853 llvm-svn: 241185
* [NVPTX] Fix issue introduced in D10321Jingyue Wu2015-06-301-0/+18
| | | | | | | | | | | | | | | | | | | | | | Summary: Really check if %SP is not used in other places, instead of checking only exact one non-dbg use. Patched by Xuetian Weng. Test Plan: @foo4 in test/CodeGen/NVPTX/local-stack-frame.ll, create a case that SP will appear twice. Reviewers: jholewinski, jingyue Reviewed By: jingyue Subscribers: llvm-commits, sfantao, jholewinski Differential Revision: http://reviews.llvm.org/D10844 llvm-svn: 241099
* Add NVPTXPeephole pass to reduce unnecessary address castJingyue Wu2015-06-241-4/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch first change the register that holds local address for stack frame to %SPL. Then the new NVPTXPeephole pass will try to scan the following pattern %vreg0<def> = LEA_ADDRi64 <fi#0>, 4 %vreg1<def> = cvta_to_local %vreg0 and transform it into %vreg1<def> = LEA_ADDRi64 %VRFrameLocal, 4 Patched by Xuetian Weng Test Plan: test/CodeGen/NVPTX/local-stack-frame.ll Reviewers: jholewinski, jingyue Reviewed By: jingyue Subscribers: eliben, jholewinski, llvm-commits Differential Revision: http://reviews.llvm.org/D10549 llvm-svn: 240587
* [NVPTX] Rename registers %fl -> %fd and %rl -> %rdJustin Holewinski2014-07-161-2/+2
| | | | | | This matches the internal behavior of NVIDIA tools like libnvvm. llvm-svn: 213168
* Fix the test: DCE optimized away everything.Eli Bendersky2014-04-211-9/+9
| | | | | | | | Use volatile store to protect the generated PTX from DCE. Patch by Jingyue Wu. llvm-svn: 206763
* [NVPTX] Fix bug in stack code generation causes by MC conversionJustin Holewinski2013-08-061-0/+18
We do use a very small set of physical registers, so account for them in the virtual register encoding between MachineInstr and MC llvm-svn: 187799
OpenPOWER on IntegriCloud