https://bugs.llvm.org/show_bug.cgi?id=47691

            Bug ID: 47691
           Summary: Mixing inline and ifunc confuses clang
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
          Assignee: unassignedclangb...@nondot.org
          Reporter: raf...@espindo.la
                CC: blitzrak...@gmail.com, dgre...@apple.com,
                    erik.pilking...@gmail.com, llvm-bugs@lists.llvm.org,
                    richard-l...@metafoo.co.uk

Created attachment 24010
  --> https://bugs.llvm.org/attachment.cgi?id=24010&action=edit
testcas

Compile twice with
$ clang++ -Os -S -o test1.s test.cc -DINLINE=
$ clang++ -Os -S -o test2.s test.cc -DINLINE=inline

The first file has the expected result:

_Z9foobarzedPvS_.avx2:                  # @_Z9foobarzedPvS_.avx2
        .cfi_startproc
# %bb.0:
        vlddqu  (%rdi), %ymm0
        vlddqu  (%rsi), %ymm1
        vpcmpgtq        %ymm1, %ymm0, %ymm0
        vpmovmskb       %ymm0, %eax
        vzeroupper
        retq

In the second one it looks like clang sees declarations for the avx functions:

_Z9foobarzedPvS_.avx2:                  # @_Z9foobarzedPvS_.avx2
        .cfi_startproc
# %bb.0:
        pushq   %rbp
        .cfi_def_cfa_offset 16
        .cfi_offset %rbp, -16
        movq    %rsp, %rbp
        .cfi_def_cfa_register %rbp
        pushq   %rbx
        andq    $-32, %rsp
        subq    $224, %rsp
        .cfi_offset %rbx, -24
        movq    %rsi, %rbx
        callq   _ZL18_mm256_lddqu_si256PKDv4_x

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to