[LLVMbugs] [Bug 11291] New: LLVM 3.0rc2: popcnt instruction fails on OSX (invalid suffix)
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Nov 1 22:11:48 PDT 2011
http://llvm.org/bugs/show_bug.cgi?id=11291
Bug #: 11291
Summary: LLVM 3.0rc2: popcnt instruction fails on OSX (invalid
suffix)
Product: new-bugs
Version: 2.9
Platform: PC
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: davidterei at gmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 7570
--> http://llvm.org/bugs/attachment.cgi?id=7570
testcase
I've attached a small test case that produces assembly code that the assemblers
on OSX can't handle. OSX doesn't handle the length suffixes on the popcnt
instruction (e.g. {w,l,q}).
Here is a related GCC bug for this issue:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34497#c14
I believe they fixed it by not adding the suffix on OSX, which works fine.
Indeed changing instruction definition in lib/Target/X86/X86InstrSSE.td to drop
the suffix, works fine.
The integrated assembler of llc works fine but GHC which uses LLVM can't use
the integrated assembler at this stage as we do some assembly post processing.
== To Reproduce ==
1. llc testcase.ll -o testcase.s
2. gcc -m32 -c testcase.s -o b.o
(or as -arch i386 testcase.s)
== Expected Output ==
Shiny object file
== Actual Output ==
testcase.s:7:suffix or operands invalid for `popcnt'
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list