http://llvm.org/bugs/show_bug.cgi?id=4918
Summary: Optimize mul and equality test to mul-with-overflow
Product: libraries
Version: trunk
Platform: PC
URL: http://codepad.org/ugwQ37sh
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Scalar Optimizations
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
Created an attachment (id=3468)
--> (http://llvm.org/bugs/attachment.cgi?id=3468)
Pastebin
This is a forwarded complaint by "bearophile" on LLVM IRC, who unfortunately
never files bugs.
The following should be optimized to a mul-with-overflow:
%L_ext = zext i32 %L to i64
%R_ext = zext i32 %R to i64
%mul64 = mul i64 %L_ext, %R_ext # no uses except the following:
%trunc = trunc i64 %mul64 to i32
%zext = zext i32 %trunc to i64
%overflow = icmp eq i64 %mul64, %zext
This pattern should create either a smul-with-overflow or a umul-with-overflow
depending on whether a sext or a zext is used.
--
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