Skip to content

__builtin_elementwise_pow breaks with .yyy swizzle from const pointer #141397

Closed
@StreetwareGames

Description

@StreetwareGames

couldn't really think of a better way to describe the bug. here's the repro code:

typedef float vec3 __attribute__((ext_vector_type(3)));

typedef struct {
    vec3 b;
} struc;

vec3 foo(vec3 a, const struc* hi) { // <- remove const and it'll compile

    vec3 b = __builtin_elementwise_max((vec3)(0.0f), a);
    
    return __builtin_elementwise_pow(b, hi->b.yyy);
}

Metadata

Metadata

Assignees

Labels

clang:frontendLanguage frontend issues, e.g. anything involving "Sema"good first issuehttps://github.com/llvm/llvm-project/contribute

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions