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: [email protected]
ReportedBy: [email protected]
CC: [email protected]
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs