[PATCH] D148120: [InstCombine] Remove scalable get_active_lane_mask calls which are always false
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 12 13:11:03 PDT 2023
nikic added a comment.
Do I understand correctly that this is basically optimizing get.active.lane.mask for the case where we can compute the range of op0 and show that it is always >= op1? And it implements that range calculation for this special case of a post-inc IV?
I don't think this is quite right in that it does not account for addition overflow. That's not actually possible in your specific test cases, but I don't think your implementation has sufficient preconditions to prove this.
Why does the loop vectorizer generate this code in the first place? Given that it involves reasoning about IVs, it might be more straightforward to handle this in SCEV/LV.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp:3087
+ auto PFalse = Constant::getNullValue(II->getType());
+ PFalse->takeName(II);
+ return replaceInstUsesWith(*II, PFalse);
----------------
takeName on a constant doesn't make sense.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D148120/new/
https://reviews.llvm.org/D148120
More information about the llvm-commits
mailing list