GetBoundryInstruction returns the last instruction as the instruction which follows or end(). Otherwise the last instruction in the boundry set is not being tested by isVectorizable().
Partially solve reordering of instructions. More extensive solution to follow.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/Transforms/Vectorize/LoadStoreVectorizer.cpp | ||
---|---|---|
366 ↗ | (On Diff #62526) | Can we have a comment here? Maybe just // LastInstr is not inclusive. Or alternatively maybe it would make more sense to leave this as-is and do // Range is [first, last). return std::maked_pair(FirstInstr, ++LastInstr.getIterator()); ? |
422 ↗ | (On Diff #62526) | Nit, no need for "LSV:" -- the assertion error will point to this line of code. And, can we make this message a bit more specific? Like, clearly if an assert fails, there's an error. But what is the condition we're checking here, exactly? Maybe "Range [From, To) must contain all instructions in Chain"? |
test/Transforms/LoadStoreVectorizer/AMDGPU/interleaved-mayalias-store.ll | ||
5 ↗ | (On Diff #62526) | Need a comma before "as" -- it's a conjunction separating two independent clauses. |
test/Transforms/LoadStoreVectorizer/x86/preserve-order32.ll | ||
1 ↗ | (On Diff #62526) | Can we have a comment somewhere indicating what we're testing? Same for the other test. And maybe we should get rid of whatever instructions aren't relevant to the thing we're checking from our CHECKs? |
You're missing the new lit.local.cfg for x86
lib/Transforms/Vectorize/LoadStoreVectorizer.cpp | ||
---|---|---|
197 ↗ | (On Diff #62526) | This prints the entire block doesn't it? Maybe restrict to just the name? I think printing the entire block would be way too verbose for this, and you can already use the number to refer to the -print-before output |
422 ↗ | (On Diff #62526) | This message isn't descriptive of what is wrong and doesn't need the LSV |
test/Transforms/LoadStoreVectorizer/x86/preserve-order32.ll | ||
---|---|---|
1 ↗ | (On Diff #62526) | Should this have -basicaa? |
lib/Transforms/Vectorize/LoadStoreVectorizer.cpp | ||
---|---|---|
422 ↗ | (On Diff #62526) | Need to wrap to 80 chars. But also this message can be tightened up, I think. No need to say "Error checking if chain is vectorizable:" -- we can tell from the stacktrace printed when the assert fails. And as written this doesn't make sense to me:
Maybe "to" is the wrong preposition? Or do you mean "should have been added to"? I still like my original suggestion, tbh. :) |
lib/Transforms/Vectorize/LoadStoreVectorizer.cpp | ||
---|---|---|
197 ↗ | (On Diff #62546) | This was a leftover, I removed it. |
423 ↗ | (On Diff #62546) | I meant "added to", realized that shortly after the update. Reupdated. |
test/Transforms/LoadStoreVectorizer/x86/preserve-order32.ll | ||
2 ↗ | (On Diff #62546) | I don't think so. I can added it if you think this is the case. |