Skip to content

[X86] Using _mm512_maskz_set1_epi64 on a 32-bit target causes cannot select intrinsic error #33979

@topperc

Description

@topperc
Bugzilla Link 34631
Resolution FIXED
Resolved on Sep 29, 2017 16:52
Version trunk
OS All
Blocks #33840
CC @RKSimon,@tstellar
Fixed by commit(s) r313392 r314569

Extended Description

This intrinsic is currently implemented in clang by selecting between two different builtins, __builtin_ia32_pbroadcastq512_gpr_mask(64-bit) and __builtin_ia32_pbroadcastq512_mem_mask(32-bit).

But it seems __builtin_ia32_pbroadcastq512_mem_mask was never implemented in the X86 backend. So using it just causes an isel error. And worse, on a debug build it hits an llvm_unreachable trying to expand a 64-bit operand on an intrinsic.

Test case

#include <x86intrin.h>

__m512i test_mm512_maskz_set1_epi64 (__mmask8 __M, long long __A)
{
//CHECK-LABEL: @​test_mm512_maskz_set1_epi64
//CHECK: @​llvm.x86.avx512.mask.pbroadcast.q.gpr.512
return _mm512_maskz_set1_epi64 (__M, __A);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzillaclang:headersHeaders provided by Clang, e.g. for intrinsics

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions