[LLVMbugs] [Bug 11251] New: lshr of character vector inefficient on x86
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Oct 28 09:40:47 PDT 2011
http://llvm.org/bugs/show_bug.cgi?id=11251
Summary: lshr of character vector inefficient on x86
Product: new-bugs
Version: unspecified
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: pete.cooper at gmail.com
CC: llvmbugs at cs.uiuc.edu
The following code is expanded out to 16 extracts, 16 byte shifts, and 16
inserts.
As neighbouring bytes (0 1, 2 3, etc) have equal shift amounts, this could be
done with an 8xi16 shift and then a mask on the high bits of the odd bytes
which were shifted down from the even byte in the pair but which should instead
be 0.
define <16 x i8> @shift_vec16x8(<16 x i8> %var) {
entry:
%0 = lshr <16 x i8> %var, <i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2,
i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2>
ret <16 x i8> %0
}
--
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