Delay predication of stores until near the end of vector code generation
authorJames Molloy <james.molloy@arm.com>
Wed, 9 Sep 2015 12:51:06 +0000 (12:51 +0000)
committerJames Molloy <james.molloy@arm.com>
Wed, 9 Sep 2015 12:51:06 +0000 (12:51 +0000)
commit22168a9afd79b15b5cdf5203a6cc4ee8763bc5b2
tree0b7035b90f98acf3e2e2f683ed5f70f372dee541
parenta800215d54608bbe2d6adc918765c300217d97cb
Delay predication of stores until near the end of vector code generation

Predicating stores requires creating extra blocks. It's much cleaner if we do this in one pass instead of mutating the CFG while writing vector instructions.

Besides which we can make use of helper functions to update domtree for us, reducing the work we need to do.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247139 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Vectorize/LoopVectorize.cpp
test/Transforms/LoopVectorize/if-pred-stores.ll