aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/LoopSimplify.cpp
diff options
context:
space:
mode:
authorGeoff Berry <gberry@codeaurora.org>2017-02-21 18:53:14 +0000
committerGeoff Berry <gberry@codeaurora.org>2017-02-21 18:53:14 +0000
commit5d534b6a11d6428d173279e5155b4f966dab1be7 (patch)
treeb706e6c1da467f7760c6fd7d2fce71bb608970c7 /llvm/lib/Transforms/Utils/LoopSimplify.cpp
parent16289cfcfca9fd8cd5699a00b1bd4769ffa79144 (diff)
downloadllvm-5d534b6a11d6428d173279e5155b4f966dab1be7.zip
llvm-5d534b6a11d6428d173279e5155b4f966dab1be7.tar.gz
llvm-5d534b6a11d6428d173279e5155b4f966dab1be7.tar.bz2
[CodeGenPrepare] Sink and duplicate more 'and' instructions.
Summary: Rework the code that was sinking/duplicating (icmp and, 0) sequences into blocks where they were being used by conditional branches to form more tbz instructions on AArch64. The new code is more general in that it just looks for 'and's that have all icmp 0's as users, with a target hook used to select which subset of 'and' instructions to consider. This change also enables 'and' sinking for X86, where it is more widely beneficial than on AArch64. The 'and' sinking/duplicating code is moved into the optimizeInst phase of CodeGenPrepare, where it can take advantage of the fact the OptimizeCmpExpression has already sunk/duplicated any icmps into the blocks where they are used. One minor complication from this change is that optimizeLoadExt needed to be updated to always mark 'and's it has determined should be in the same block as their feeding load in the InsertedInsts set to avoid an infinite loop of hoisting and sinking the same 'and'. This change fixes a regression on X86 in the tsan runtime caused by moving GVNHoist to a later place in the optimization pipeline (see PR31382). Reviewers: t.p.northover, qcolombet, MatzeB Subscribers: aemerson, mcrosier, sebpop, llvm-commits Differential Revision: https://reviews.llvm.org/D28813 llvm-svn: 295746
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopSimplify.cpp')
0 files changed, 0 insertions, 0 deletions