[LLVMbugs] [Bug 6417] New: inefficient code for inserting i8 into i32
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Feb 24 14:03:40 PST 2010
http://llvm.org/bugs/show_bug.cgi?id=6417
Summary: inefficient code for inserting i8 into i32
Product: new-bugs
Version: 2.6
Platform: PC
OS/Version: Windows NT
Status: NEW
Severity: enhancement
Priority: P5
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: pete.cooper at gmail.com
CC: llvmbugs at cs.uiuc.edu
Created an attachment (id=4304)
--> (http://llvm.org/bugs/attachment.cgi?id=4304)
original IR
I've been looking into the IR generated for writing a byte of a structure. The
optimizer reduces it to the code you would use for writing to a bitfield, ie,
masked and with an add for the insertion, but wouldn't it be better to use a
byte move or byte store on x86 or a shuffle on other targets?
I've attached the original IR as well as a modified version to use
insertelement as i think that could generate better code. Unfortunately, the
asm produced is horrendous with my change. I understand there are code
generator selection and possible LegalizeDag issues giving me bad asm, but is
there any reason why i shouldn't implement the optimisation for inserts and
just add the code generators we need too?
Note, i've look at 2109 and i think this is similar to that, but its for
doubles, not a vector that fits in a normal x86 register.
--
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