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

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 11 06:13:03 PST 2019


spatel marked an inline comment as done.
spatel 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 {
----------------
hfinkel wrote:
> 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".
> 
Yes, I was trying to avoid clang-specific language here. 
And in the motivating bug report, you're exactly right -- we only needed -fno-math-errno to overcome the limitation (that's why I was using the likely too vague "relaxed FP" vocabulary in the previous rev).


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

https://reviews.llvm.org/D56551





More information about the llvm-commits mailing list