[LLVMbugs] [Bug 11973] New: BB vectorizer does not fuse shifts with multiplies
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Feb 10 09:06:15 PST 2012
http://llvm.org/bugs/show_bug.cgi?id=11973
Bug #: 11973
Summary: BB vectorizer does not fuse shifts with multiplies
Product: new-bugs
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: spop at codeaurora.org
CC: hfinkel at anl.gov, llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 8037
--> http://llvm.org/bugs/attachment.cgi?id=8037
testcase
Looking at the dumps of
clang -O2 test.c -mllvm -vectorize \
-mllvm -debug-only=bb-vectorize \
-mllvm -bb-vectorize-debug-pair-selection \
-mllvm -bb-vectorize-debug-candidate-selection
when test.c does not contain coefficients that can be transformed into shifts,
the vectorizer matches different pairable instructions than when it contains a
multiple of 2.
For instance, when I replace the first write to w of the attached testcase
with:
*w++ = 2*a - 5*b + 7*c;
The debugging dumps look like this:
BBV: looking at %mul = shl i8 %0, 1 <-> %3 = mul i8 %1, -5
Whereas if that first write to w is like this:
*w++ = 3*a - 5*b + 7*c;
we have the following candidate pair:
BBV: looking at %mul = mul i8 %0, 3 <-> %3 = mul i8 %1, -5
BBV: candidate pair %mul = mul i8 %0, 3 <-> %3 = mul i8 %1, -5
--
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