[LLVMbugs] [Bug 22693] New: clang produces AVX instructions when generationg code for arch that doesn't support them

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Feb 25 05:44:38 PST 2015


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

            Bug ID: 22693
           Summary: clang produces AVX instructions when generationg code
                    for arch that doesn't support them
           Product: clang
           Version: 3.5
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
          Assignee: unassignedclangbugs at nondot.org
          Reporter: dmitry.petroff at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 13942
  --> http://llvm.org/bugs/attachment.cgi?id=13942&action=edit
test case

Problem appears on 32-bit platform.
Attached file when compiled for i686 arch contains __fixunsdfdi function with
vmovd  %edx,%xmm0 instruction that is clearly not valid on i686 arch.
Even when clang is invoked with -mno-avx and -mfpmath=387 options, vmovd is
still generated.

I've noticed this because of valgrind crash.

clang -march=i686 -g vg-bug.c && valgrind ./a.out 1.2  => illegal instruction
gcc -march=i686 -g vg-bug.c && valgrind ./a.out 1.2  => OK

-- 
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/20150225/7f64e2fd/attachment.html>


More information about the llvm-bugs mailing list