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