The loop vectorizer optimizes loops containing conditional memory accesses by generating masked load and store intrinsics.
This decision is target dependent.
I already submitted the codegen changes for the intrinsics.
Differential D6527
Using Masked Load / Store intrinsics in Loop Vectorizer delena on Dec 4 2014, 6:46 AM. Authored by
Details
The loop vectorizer optimizes loops containing conditional memory accesses by generating masked load and store intrinsics. I already submitted the codegen changes for the intrinsics.
Diff Detail Event TimelineComment Actions Very nice! I only see minor fixes. Thanks!
Comment Actions Hi Elena, Thank you for working on this. + bool canPredicateStore(Type *DataType, Value *Ptr) { Can you please document these functions? The name setMaskedOp is confusing and Doxygen style comments could be useful here. Thanks, Comment Actions Hi Elena, Please see a question from me in inline comments. And thanks for doing this! Michael
Comment Actions I'm adding comments, changing function names, joining 4 tests in one.
Comment Actions Thank you all for reviewing this. I addressed all comments and applying the updated patch. Comment Actions + / Returns true if vector representation of the instruction \p I Maybe a better name would be "isMaskRequired"? Comment Actions Hi Elena, Please see my comments inline.
Comment Actions To Michael: To Nadav:
No problem Comment Actions Michael is right about potentially trapping constant expression. I addressed this issue and also added a test for it. Comment Actions Some changes in the patch should go in separately. For example:
+ return false; } } This is a whitespace fix. Just commit it as is.
+ assert(MaxVectorSize <= 64 && "Did not expect to pack so many elements" " into one vector!"); Also the assert change can go in. + void SI(); What is SI() ?? I would also split the TTI changes into a separate patch. It can probably go in already. Comment Actions Hi Elena, Thank you for checking-in the first (small) part of the changes. The code looks good to me except some minor nits (see inline), but I'd wait for a LGTM from Nadav or Arnold.
|
This is a predicate. Could you rename it to isMaskedOperation?