[all-commits] [llvm/llvm-project] 4431d6: Support ExtVectorType conditional operator

Min-Yih Hsu via All-commits all-commits at lists.llvm.org
Tue Jun 2 09:36:22 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 4431d64c10cb681986e752420f1136f259daa5a7
      https://github.com/llvm/llvm-project/commit/4431d64c10cb681986e752420f1136f259daa5a7
  Author: Min-Yih Hsu <minyihh at uci.edu>
  Date:   2020-06-02 (Tue, 02 Jun 2020)

  Changed paths:
    M clang/docs/LanguageExtensions.rst
    M clang/lib/CodeGen/CGExprScalar.cpp
    M clang/lib/Sema/SemaExpr.cpp
    M clang/test/Sema/ext_vector_comparisons.c

  Log Message:
  -----------
  Support ExtVectorType conditional operator

Extension vectors now can be used in element-wise conditional selector.
For example:
```
R[i] = C[i]? A[i] : B[i]
```
This feature was previously only enabled in OpenCL C. Now it's also
available in C. Not that it has different behaviors than GNU vectors
(i.e. __vector_size__). Extension vectors selects on signdness of the
vector. GNU vectors on the other hand do normal bool conversions. Also,
this feature is not available in C++.

Differential Revision: https://reviews.llvm.org/D80574




More information about the All-commits mailing list