Skip to content
Commit 4fa8bb34 authored by Chris Lattner's avatar Chris Lattner
Browse files

Fix a bogus optimization: folding (slt (zext i1 A to i32), 1) -> (slt i1 A, true)

This cause a regression in InstCombine/JavaCompare, which was doing the right
thing on accident.  To handle the missed case, generalize the comparisons based
on masked bits a little bit to handle comparisons against the max value. For 
example, we can now xform (slt i32 (and X, 4), 4) -> (setne i32 (and X, 4), 4)

llvm-svn: 53443
parent 1be09d9e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment