[LLVMbugs] [Bug 19416] New: Clang cannot do LTO with BMI2 instructions

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Apr 13 13:30:41 PDT 2014


http://llvm.org/bugs/show_bug.cgi?id=19416

            Bug ID: 19416
           Summary: Clang cannot do LTO with BMI2 instructions
           Product: clang
           Version: 3.4
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
          Assignee: unassignedclangbugs at nondot.org
          Reporter: services at daylenyang.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 12368
  --> http://llvm.org/bugs/attachment.cgi?id=12368&action=edit
Test file with a BMI2 instruction.

Overview:
Clang cannot do LTO (link time optimization) when there are BMI2 instructions
in the file.

Steps to reproduce:
0. Make sure you have an Intel Haswell processor.
1. Create a simple C program (such as the one attached) that contains a BMI2
intrinsic such as _pext_u32(). Be sure to include <x86intrin.h>.
2. Compile using command: clang -mbmi2 file_name.c
3. Compile using command: clang -mbmi2 -flto file_name.c

Actual results:
Compiling without LTO works great. Compiling using LTO crashes with this error:
LLVM ERROR: Cannot select: intrinsic %llvm.x86.bmi.pext.32
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Expected results:
Clang should be able to compile the file with LTO.

Version:
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.1.0
Thread model: posix

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140413/af31400d/attachment.html>


More information about the llvm-bugs mailing list