q66 added a comment.

and indeed, it affects semantics too:

  /tmp$ clang++ test.cc -o test -faltivec-src-compat=xl                         
                                                                                
                                                                 
  /tmp$ ./test
  b
  b
  b
  /tmp$ clang++ test.cc -o test -faltivec-src-compat=gcc                        
                                                                                
                                                                 
  /tmp$ ./test                                                                  
                                                                                
                                                                 
  Dv4_i
  Dv4_i
  Dv8_s
  /tmp$ clang++ test.cc -o test -faltivec-src-compat=mixed                      
                                                                                
                                                                 
  test.cc:10:20: warning: Current handling of vector bool and vector pixel 
types in this context are deprecated. The default behaviour will soon change to 
that implied by the '-altivec-compat=xl' option 
[-Wdeprecated-altivec-src-compat]
      auto cmp = (v1 == v2);
                     ^
  test.cc:12:22: warning: Current handling of vector bool and vector pixel 
types in this context are deprecated. The default behaviour will soon change to 
that implied by the '-altivec-compat=xl' option 
[-Wdeprecated-altivec-src-compat]
      auto pcmp = (pv1 == pv2);
                       ^
  2 warnings generated.
  /tmp$ ./test                                                                  
                                                                                
                                                                 
  Dv4_i
  b
  Dv8_s
  /tmp$ cat test.cc
  #include <typeinfo>
  #include <cstdio>
  
  typedef float simd4f __attribute__((vector_size(16)));
  
  int main() {
      simd4f v1, v2;
      vector float fv1, fv2;
      vector pixel pv1, pv2;
      auto cmp = (v1 == v2);
      auto acmp = (fv1 == fv2);
      auto pcmp = (pv1 == pv2);
      printf("%s\n", typeid(cmp).name());
      printf("%s\n", typeid(acmp).name());
      printf("%s\n", typeid(pcmp).name());
  }


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D106120

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to