[LLVMbugs] [Bug 2298] Missed optimization: should instcombine icmp ~A, ~B to icmp B, A
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Thu May 8 22:21:24 PDT 2008
http://llvm.org/bugs/show_bug.cgi?id=2298
Chris Lattner <sabre at nondot.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #1 from Chris Lattner <sabre at nondot.org> 2008-05-09 00:21:23 ---
This triggered a quite a few times in multisource across several different
programs:
**** %tmp177.i = icmp slt i32 %tmp176.i17, -1 ; <i1>
[#uses=1]
...
**** %tmp42 = icmp ugt i32 %tmp35, %tmp40 ; <i1> [#uses=1]
**** %tmp27 = icmp ugt i32 %tmp23, %tmp26 ; <i1> [#uses=1]
**** %tmp33 = icmp ugt i32 %tmp30, %tmp32 ; <i1> [#uses=1]
...
**** %tmp23 = icmp ugt i32 %tmp17, %tmp22 ; <i1> [#uses=1]
**** %tmp18 = icmp ugt i32 %tmp13, %tmp17 ; <i1> [#uses=1]
....
**** %tmp42 = icmp ult i32 %tmp41, -4 ; <i1> [#uses=1]
...
**** %tmp24 = icmp ugt i32 %tmp14, %tmp22 ; <i1> [#uses=1]
**** %tmp37 = icmp ugt i32 %tmp29, %tmp35 ; <i1> [#uses=1]
**** %tmp27 = icmp ugt i32 %tmp21, %tmp26 ; <i1> [#uses=1]
**** %tmp41 = icmp ugt i32 %tmp32, %tmp39 ; <i1> [#uses=1]
I also implemented the '-x == -y' xform, which is only valid for equality
operators:
**** --- %tmp14 = icmp eq i32 %tmp, -4 ; <i1> [#uses=1]
**** --- %tmp436751 = icmp eq i32 %tmp441.rec, -2 ; <i1>
[#uses=1]
this seems to come from loop optimizations or something. Lots of things that
use ".rec" as a suffix.
Patch here:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20080505/062193.html
Thanks!
--
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