[PATCH] D106120: [PowerPC] Implement vector bool/pixel initialization under -faltivec-src-compat=xl

2021-12-20 Thread Daniel Kolesa via Phabricator via cfe-commits
q66 added a comment. I see. Is there a way to compile-time-detect whether one is getting the XL behavior? This is still a potential concern for things that expose vector ops in public headers. There should be a macro of some kind to detect this at compile time and follow the XL semantics when n

[PATCH] D106120: [PowerPC] Implement vector bool/pixel initialization under -faltivec-src-compat=xl

2021-12-20 Thread Nemanja Ivanovic via Phabricator via cfe-commits
nemanjai added a comment. In D106120#3197209 , @q66 wrote: > Well, I'm more concerned about the actual semantics - as I see it, when using > generic vectors, they should be unaffected by the comparison behavior of > AltiVec vectors, which is not the cas

[PATCH] D106120: [PowerPC] Implement vector bool/pixel initialization under -faltivec-src-compat=xl

2021-12-16 Thread Daniel Kolesa via Phabricator via cfe-commits
q66 added a comment. Well, I'm more concerned about the actual semantics - as I see it, when using generic vectors, they should be unaffected by the comparison behavior of AltiVec vectors, which is not the case when you set the mode to `xl`. If the semantics are affected, it means creating a ma

[PATCH] D106120: [PowerPC] Implement vector bool/pixel initialization under -faltivec-src-compat=xl

2021-12-16 Thread Nemanja Ivanovic via Phabricator via cfe-commits
nemanjai added a comment. In D106120#3196010 , @q66 wrote: > On x86_64, the program predictably prints `Dv4_i`. The semantics here are not new, but the warning is emitted for generic vector types as a result of https://reviews.llvm.org/D103615. This is

[PATCH] D106120: [PowerPC] Implement vector bool/pixel initialization under -faltivec-src-compat=xl

2021-12-15 Thread Daniel Kolesa via Phabricator via cfe-commits
q66 added a comment. On x86_64, the program predictably prints `Dv4_i`. 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

[PATCH] D106120: [PowerPC] Implement vector bool/pixel initialization under -faltivec-src-compat=xl

2021-12-15 Thread Daniel Kolesa via Phabricator via cfe-commits
q66 added a comment. and indeed, it affects semantics too: /tmp$ clang++ test.cc -o test -faltivec-src-compat=xl /tmp$ ./

[PATCH] D106120: [PowerPC] Implement vector bool/pixel initialization under -faltivec-src-compat=xl

2021-12-15 Thread Daniel Kolesa via Phabricator via cfe-commits
q66 added a comment. Hi, this warning also affects GCC-style vectors: e.g. typedef int myivec __attribute__((vector_size(16)); typedef float myfvec __attribute__((vector_size(16)); const myvec ret = (myfvec1 == myfvec2); // will issue a warning Should it? This means different semantics b

[PATCH] D106120: [PowerPC] Implement vector bool/pixel initialization under -faltivec-src-compat=xl

2021-07-19 Thread Amy Kwan via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGdd5aa657a520: [PowerPC] Implement vector bool/pixel initialization under -faltivec-src… (authored by amyk). Changed prior to commit: https://revie

[PATCH] D106120: [PowerPC] Implement vector bool/pixel initialization under -faltivec-src-compat=xl

2021-07-16 Thread Nemanja Ivanovic via Phabricator via cfe-commits
nemanjai accepted this revision. nemanjai added a comment. This revision is now accepted and ready to land. LGTM other than a minor nit about a comment. Comment at: clang/include/clang/Sema/Sema.h:6112-6115 + // Checks if we have a valid AltiVec vector type, and splats the +

[PATCH] D106120: [PowerPC] Implement vector bool/pixel initialization under -faltivec-src-compat=xl

2021-07-16 Thread Amy Kwan via Phabricator via cfe-commits
amyk updated this revision to Diff 359358. amyk added a comment. Update patch and touched base with Nemanja. - Removed the scalar vector test files that we already test for. - Update CHECKs in LIT tests accordingly. - Remove unnecessary `Sema` parameter in added function. - Keep two test files fo

[PATCH] D106120: [PowerPC] Implement vector bool/pixel initialization under -faltivec-src-compat=xl

2021-07-16 Thread Nemanja Ivanovic via Phabricator via cfe-commits
nemanjai requested changes to this revision. nemanjai added a comment. This revision now requires changes to proceed. Why are `vector-scalar-altivec-init.c` and `vector-scalar-altivec-init2.c` added? There is no initialization of `vector bool` or `vector pixel` in them so I don't really see the

[PATCH] D106120: [PowerPC] Implement vector bool/pixel initialization under -faltivec-src-compat=xl

2021-07-15 Thread Amy Kwan via Phabricator via cfe-commits
amyk created this revision. amyk added reviewers: PowerPC, nemanjai, stefanp, power-llvm-team, bmahjour. amyk added projects: LLVM, PowerPC, clang. Herald added a subscriber: shchenz. amyk requested review of this revision. This patch implements the initialization of vectors under the `-faltivec-