From: Benjamin Kramer Date: Wed, 7 Sep 2011 22:49:26 +0000 (+0000) Subject: Add two notes for correlated-expression optimizations. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=3e328ecbd869e0e5cd309ddd793da6857e3b4431;p=oota-llvm.git Add two notes for correlated-expression optimizations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139263 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/README.txt b/lib/Target/README.txt index 4cc95340890..1f69ffb09c0 100644 --- a/lib/Target/README.txt +++ b/lib/Target/README.txt @@ -2348,3 +2348,13 @@ which can do this in a single operation (instruction or libcall). It is probably best to do this in the code generator. //===---------------------------------------------------------------------===// + +unsigned foo(unsigned x, unsigned y) { return (x & y) == 0 || x == 0; } +should fold to (x & y) == 0. + +//===---------------------------------------------------------------------===// + +unsigned foo(unsigned x, unsigned y) { return x > y && x != 0; } +should fold to x > y. + +//===---------------------------------------------------------------------===//