[LLVMbugs] [Bug 22357] New: missed opportunities in reassociation or instcombine
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Jan 27 10:24:09 PST 2015
http://llvm.org/bugs/show_bug.cgi?id=22357
Bug ID: 22357
Summary: missed opportunities in reassociation or instcombine
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Scalar Optimizations
Assignee: unassignedbugs at nondot.org
Reporter: wujingyue at gmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 13742
--> http://llvm.org/bugs/attachment.cgi?id=13742&action=edit
IR for the example
void foo(int a, int b, int c, int *x, int *y) {
*x = (a + b);
*y = (a + 2) + b;
}
I would love to see the above example be optimized to:
void foo(int a, int b, int c, int *x, int *y) {
int t = a + b;
*x = t;
int t2 = t + 2;
*y = t2;
}
However, this is not happening with the current LLVM.
I wonder how we can add this enhancement. It seems related to reassociation,
instcombine, and maybe even GVN?
Jingyue
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150127/248193f2/attachment.html>
More information about the llvm-bugs
mailing list