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

Nemanja Ivanovic via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 20 11:37:56 PST 2021


nemanjai added a comment.

In D106120#3197209 <https://reviews.llvm.org/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 case when you set the mode to `xl`. If the semantics are affected, it means creating a massive pain for libraries that use generic vectors without caring what platform they are in (since they will get a vector as a result of comparison on x86_64, but a bool on PowerPC). And since the behavior can be switched with a compiler flag, they don't even have a reasonable way to make this conditional in the code.

Only users that are looking to match the XL behaviour will ever use the `xl` mode. I realize that the warning incorrectly states that the default behaviour will be switched to XL in the future but this is wrong (and we will correct it). Unfortunately with the XL compiler, the behaviour is to produce a `bool/int` when comparing two vectors regardless of whether they are Altivec vectors or generic ones.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D106120



More information about the cfe-commits mailing list