[PATCH] D13297: [CGP] transform select instructions into branches and sink expensive operands
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 30 09:35:14 PDT 2015
spatel created this revision.
spatel added reviewers: reames, hfinkel, joker.eph, bkramer.
spatel added a subscriber: llvm-commits.
This is a follow-up to the discussion in D12882.
Ideally, we would like SimplifyCFG to be able to form select instructions even when the operands are expensive (as defined by the TTI cost model) because that may expose further optimizations. However, we would then like a later pass like CodeGenPrepare to undo that transformation if the target would likely benefit from not speculatively executing an expensive op (this patch).
Once we have this safety mechanism in place, we can adjust SimplifyCFG to restore its select-formation behavior that changed with r248439.
http://reviews.llvm.org/D13297
Files:
lib/CodeGen/CodeGenPrepare.cpp
test/Transforms/CodeGenPrepare/select.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13297.36118.patch
Type: text/x-patch
Size: 9861 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150930/4f09d940/attachment.bin>
More information about the llvm-commits
mailing list