[PATCH] D56551: [LoopVectorizer] give more advice in remark about failure to vectorize call

Hal Finkel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 10 18:05:56 PST 2019


hfinkel added inline comments.


================
Comment at: lib/Transforms/Vectorize/LoopVectorizationLegality.cpp:726
+          ORE->emit(createMissedAnalysis("CantVectorizeLibcall", CI)
+              << "library call cannot be vectorized (try using fast-math)");
+        } else {
----------------
I'd prefer it say "fast-math mode" instead of just "fast-math". It would be nice if we could also point users to -fno-math-errno, as that might fix this problem for them and they might not be able to use -ffast-math for the whole translation unit.

Now we already have a problem in the vectorizer because it has a lot of optimization remarks that mention Clang-specific things (flags, pragmas, etc.). The intent of the optimization-remark design was that the frontend callback handler would handle such cases by adding frontend-specific information in the frontend (and not have it embedded here). That didn't happen, and while we should clean this up, in the mean time we might just make the problem incrementally worse and mention flags here too: "try compiling with -fno-math-errno or -ffast-math".



CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D56551/new/

https://reviews.llvm.org/D56551





More information about the llvm-commits mailing list