[PATCH] D22918: [Loop Vectorizer] Support predication of div/rem
Gil Rapaport via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 18 14:32:52 PDT 2016
gilr added inline comments.
================
Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:4111-4118
@@ +4110,10 @@
+ continue;
+ bool CanSinkToUse = true;
+ for (User *U : OpInst->users()) {
+ if (U != &*I) {
+ // The extractelement is feeding another instruction - give up.
+ CanSinkToUse = false;
+ break;
+ }
+ }
+ if (CanSinkToUse)
----------------
anemet wrote:
> OK, is this difference relevant? If yes, add a helper either in this module or at a more global place and use it.
>
> You can probably also writes this with std::all_of or something.
It shouldn't make a difference for the currently predicated instructions. I'll replace with hasOneUse with a comment to capture the possible (conservative) inaccuracy.
https://reviews.llvm.org/D22918
More information about the llvm-commits
mailing list