[PATCH] D103615: [Clang] Add option for vector compare compatibility.
Bardia Mahjour via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 14 11:25:02 PDT 2021
bmahjour added inline comments.
================
Comment at: clang/include/clang/Basic/LangOptions.h:248
+ enum class VectorCompareCompatKind {
+ // Default clang behaviour.
+ // All vector compares produce scalars except vector Pixel and vector bool.
----------------
How about adding `Default = Mixed` at the end and moving the comment with it?
================
Comment at: clang/include/clang/Basic/LangOptions.h:249
+ // Default clang behaviour.
+ // All vector compares produce scalars except vector Pixel and vector bool.
+ // The types vector Pixel and vector bool return vector results.
----------------
Pixel -> pixel
================
Comment at: clang/include/clang/Basic/LangOptions.h:250
+ // All vector compares produce scalars except vector Pixel and vector bool.
+ // The types vector Pixel and vector bool return vector results.
+ Mixed,
----------------
[nit] Pixel -> pixel
================
Comment at: clang/lib/Sema/SemaExpr.cpp:12221
+ // which behavior is prefered.
+ switch (getLangOpts().getVectorCompareCompat()) {
+ case LangOptions::VectorCompareCompatKind::Mixed:
----------------
Check for `getLangOpts().AltiVec` before the switch?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103615/new/
https://reviews.llvm.org/D103615
More information about the cfe-commits
mailing list