Closed
Description
| Bugzilla Link | 50133 |
| Resolution | FIXED |
| Resolved on | Apr 29, 2021 19:25 |
| Version | trunk |
| OS | Windows NT |
| CC | @topperc,@RKSimon,@phoebewang,@rnk,@rotateright |
| Fixed by commit(s) | https://reviews.llvm.org/rGe0c7db7d8ce780df5129b4d0f5bbf145271ef14f |
Extended Description
Small reproducer:
#include
#include
#include <intrin.h>
struct A {
std::string S;
std::vector<std::array<int, 4>> V;
A() {
std::array<int, 4> B;
__cpuid(B.data(), 0);
V.push_back(B);
V.push_back(B);
char C[64];
memset(C, 0, sizeof(C));
S = C;
}
} T;
Commands:
clang-cl -mavx2 /EHs repro.cpp -S
cat repro.asm | grep cpuid -A7
cpuid
#NO_APP
mov r11d, eax
mov rax, qword ptr [rbx + 72] # 8-byte Reload
mov r10d, ebx
mov r9d, ecx
mov rcx, qword ptr [rbx + 80] # 8-byte Reload
mov r8d, edx
Activity