[clang] [clang][bytecode] Implement arithmetic, bitwise and compound assignment operator (PR #108949)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 19 18:34:50 PDT 2024
yronglin wrote:
> Does it work to _not_ discard the result of a compound operator?
>
> ```c++
> using VI __attribute__((ext_vector_type(4))) = int;
>
> constexpr int a() {
> VI a = {0, 0, 0, 0};
> VI b = {1,1,1,1};
>
> VI C = (a += b);
>
> return 0;
> }
>
> static_assert(a() == 0);
> ```
Good catch! I've fixed this issue.
https://github.com/llvm/llvm-project/pull/108949
More information about the cfe-commits
mailing list