We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In a situation like the following (modeled after what happens in a C++ constructor with two base classes), the SLP vectorizer seems too aggressive:
struct C { char *BaseA; char *BaseB; }; extern char VTab[]; void initC(C *c) { c->BaseA = VTab + 48; c->BaseB = VTab + 16; }
The SLP Vectorizer transforms:
%BaseA = getelementptr inbounds %struct.C, %struct.C* %c, i64 0, i32 0 store i8* getelementptr inbounds ([0 x i8], [0 x i8]* @VTab, i64 0, i64 48), i8** %BaseA, align 8, !tbaa !2 %BaseB = getelementptr inbounds %struct.C, %struct.C* %c, i64 0, i32 1 store i8* getelementptr inbounds ([0 x i8], [0 x i8]* @VTab, i64 0, i64 16), i8** %BaseB, align 8, !tbaa !7
into:
%BaseA = getelementptr inbounds %struct.C, %struct.C* %c, i64 0, i32 0 %BaseB = getelementptr inbounds %struct.C, %struct.C* %c, i64 0, i32 1 %0 = bitcast i8** %BaseA to <2 x i8*>* store <2 x i8*> <i8* getelementptr inbounds ([0 x i8], [0 x i8]* @VTab, i64 0, i64 48), i8* getelementptr inbounds ([0 x i8], [0 x i8]* @VTab, i64 0, i64 16)>, <2 x i8*>* %0, align 8, !tbaa !2 ret void
which results in this code on X86:
movq _VTab@GOTPCREL(%rip), %rax leaq 16(%rax), %rcx movd %rcx, %xmm0 addq $48, %rax movd %rax, %xmm1 punpcklqdq %xmm0, %xmm1 ## xmm1 = xmm1[0],xmm0[0] movdqu %xmm1, (%rdi)
while it can be this if the SLP Vectorizer doesn't do anything:
movq _VTab@GOTPCREL(%rip), %rax leaq 48(%rax), %rcx movq %rcx, (%rdi) addq $16, %rax movq %rax, 8(%rdi)
The text was updated successfully, but these errors were encountered:
Cannot be reproduced in trunk, fixed
Sorry, something went wrong.
No branches or pull requests
Uh oh!
There was an error while loading. Please reload this page.
Extended Description
In a situation like the following (modeled after what happens in a C++ constructor with two base classes), the SLP vectorizer seems too aggressive:
The SLP Vectorizer transforms:
into:
which results in this code on X86:
while it can be this if the SLP Vectorizer doesn't do anything:
The text was updated successfully, but these errors were encountered: