[LLVMbugs] [Bug 8866] instcombine does not get max if hidden by sext
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Jan 7 13:55:04 PST 2011
http://llvm.org/bugs/show_bug.cgi?id=8866
Tobias Grosser <grosser at fim.uni-passau.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #4 from Tobias Grosser <grosser at fim.uni-passau.de> 2011-01-07 15:55:03 CST ---
(In reply to comment #3)
> Patch posted:
> http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20110103/114606.html
>
> Thanks Dan for the hint
An improved version of this patch committed:
Revision: 123034
URL: http://llvm.org/viewvc/llvm-project?rev=123034&view=rev
Log: InstCombine: Match min/max hidden by sext/zext
X = sext x; x >s c ? X : C+1 --> X = sext x; X <s C+1 ? C+1 : X
X = sext x; x <s c ? X : C-1 --> X = sext x; X >s C-1 ? C-1 : X
X = zext x; x >u c ? X : C+1 --> X = zext x; X <u C+1 ? C+1 : X
X = zext x; x <u c ? X : C-1 --> X = zext x; X >u C-1 ? C-1 : X
X = sext x; x >u c ? X : C+1 --> X = sext x; X <u C+1 ? C+1 : X
X = sext x; x <u c ? X : C-1 --> X = sext x; X >u C-1 ? C-1 : X
Instead of calculating this with mixed types promote all to the
larger type. This enables scalar evolution to analyze this
expression. PR8866
--
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