Skip to content

Commit d056829

Browse files
j-mattssoncyb70289
authored andcommitted
ARROW-15607: [C++] Fix incorrect CPUID flag for AVX detection
(I don't have any experience with this codebase so someone should probably review this before merging.) Closes #12347 from mjunix/avx-fix Authored-by: Johan Mattsson <[email protected]> Signed-off-by: Yibo Cai <[email protected]>
1 parent ee7897a commit d056829

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cpp/src/arrow/util/cpu_info.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ bool RetrieveCPUInfo(int64_t* hardware_flags, std::string* model_name,
288288
if (features_ECX[19]) *hardware_flags |= CpuInfo::SSE4_1;
289289
if (features_ECX[20]) *hardware_flags |= CpuInfo::SSE4_2;
290290
if (features_ECX[23]) *hardware_flags |= CpuInfo::POPCNT;
291-
if (features_ECX[23]) *hardware_flags |= CpuInfo::AVX;
291+
if (features_ECX[28]) *hardware_flags |= CpuInfo::AVX;
292292

293293
// cpuid with EAX=7, ECX=0: Extended Features
294294
register_EAX_id = 7;

0 commit comments

Comments
 (0)