[llvm-commits] [llvm] r151467 - in /llvm/trunk: lib/Analysis/InstructionSimplify.cpp test/Transforms/InstCombine/icmp.ll test/Transforms/InstSimplify/compare.ll
eli.friedman at gmail.com
Wed Feb 29 00:06:20 PST 2012
On Tue, Feb 28, 2012 at 11:49 PM, Nick Lewycky <nicholas at mxc.ca> wrote:
> Eli Friedman wrote:
>> On Sat, Feb 25, 2012 at 6:09 PM, Nick Lewycky<nicholas at mxc.ca> wrote:
>>> Author: nicholas
>>> Date: Sat Feb 25 20:09:49 2012
>>> New Revision: 151467
>>> URL: http://llvm.org/viewvc/llvm-project?rev=151467&view=rev
>>> Reinstate the optimization from r151449 with a fix to not turn 'gep %x'
>>> 'gep null' when the icmp predicate is unsigned (or is signed without
>> This change is causing an execution failure in the gcc testsuite on
>> gcc.c-torture/execute/frame-address.c . Please take a look.
> int check_fa_work (const char *c, const char *f)
> const char d = 0;
> if (c >= &d)
> return c >= f && f >= &d;
> return c <= f && f <= &d;
> With this patch we decide that the incoming arguments can't legitimately be
> compared with the local variable, taking advantage of the undefined
> behaviour. This function is optimized into "ret i32 0".
The LangRef rules for icmp seem to state that the result is always
well-defined... if we're following different rules, please update it.
More information about the llvm-commits