http://llvm.org/bugs/show_bug.cgi?id=18808
Bug ID: 18808
Summary: clang -O4 drops other -mavx2 and possibly other flags
Product: clang
Version: 3.3
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Driver
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
Created attachment 12047
--> http://llvm.org/bugs/attachment.cgi?id=12047&action=edit
A terminal transcript with a test case
I found that
clang -O4 -mavx2 *.c
sets AVX2 in the frontend, but not during link-time optimization. The same may
be true for other flags. This causes problems with code that tries to detect
whether AVX2 (or possibly other features) are supported, since it will emit
code designed for those features but they will not be present during link-time
optimization.
The terminal transcript shows the bug in action. When compiled with -O3, AVX2
instructions are emitted, and when compiled with -O4, they are not. The
transcript does not show that __AVX2__ is defined in the C file, but in fact it
is.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs