[all-commits] [llvm/llvm-project] b29495: [clang][bytecode] Fix the handling of address of a...

yronglin via All-commits all-commits at lists.llvm.org
Fri Aug 30 02:34:22 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b294951e3967730ffad14d51297694b1411d7af6
      https://github.com/llvm/llvm-project/commit/b294951e3967730ffad14d51297694b1411d7af6
  Author: yronglin <yronglin777 at gmail.com>
  Date:   2024-08-30 (Fri, 30 Aug 2024)

  Changed paths:
    M clang/lib/AST/ByteCode/Compiler.cpp
    M clang/test/CodeGen/compound-literal.c

  Log Message:
  -----------
  [clang][bytecode] Fix the handling of address of a vector (#106558)

The PR https://github.com/llvm/llvm-project/pull/105996 broke taking the
address of a vector:

**compound-literal.c**
```C
typedef int v4i32 __attribute((vector_size(16)));
v4i32 *y = &(v4i32){1,2,3,4};
```
That because the current interpreter handle vector unary operator as a
fallback when the generic code path fail. but the new interpreter was
not. we need to handle `UO_AddrOf` in
`Compiler<Emitter>::VisitVectorUnaryOperator`.

Signed-off-by: yronglin <yronglin777 at gmail.com>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list