Meinersbur added a comment. To illustrate how complicated interpreting the vectorize pragma has become in the mid-end:
TransformationMode llvm::hasVectorizeTransformation(Loop *L) { Optional<bool> Enable = getOptionalBoolLoopAttribute(L, "llvm.loop.vectorize.enable"); if (Enable == false) return TM_SuppressedByUser; Optional<ElementCount> VectorizeWidth = getOptionalElementCountLoopAttribute(L); Optional<int> InterleaveCount = getOptionalIntLoopAttribute(L, "llvm.loop.interleave.count"); // 'Forcing' vector width and interleave count to one effectively disables // this transformation. if (Enable == true && VectorizeWidth && VectorizeWidth->isScalar() && InterleaveCount == 1) return TM_SuppressedByUser; if (getBooleanLoopAttribute(L, "llvm.loop.isvectorized")) return TM_Disable; if (Enable == true) return TM_ForcedByUser; if ((VectorizeWidth && VectorizeWidth->isScalar()) && InterleaveCount == 1) return TM_Disable; if ((VectorizeWidth && VectorizeWidth->isVector()) || InterleaveCount > 1) return TM_Enable; if (hasDisableAllTransformsHint(L)) return TM_Disable; return TM_Unspecified; } Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94779/new/ https://reviews.llvm.org/D94779 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits