http://llvm.org/bugs/show_bug.cgi?id=21611
Bug ID: 21611
Summary: Reassociate: nsw/nuw dropped when merging add into mul
Product: libraries
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Scalar Optimizations
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
consider:
define i32 @triple_i(i32 %x) {
%1 = add nsw i32 %x, %x
%2 = add nsw i32 %1, %x
ret i32 %2
}
after running with opt -reassociate:
define i32 @triple_i(i32 %x) {
%factor = mul i32 %x, 3
ret i32 %factor
}
--
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