Skip to content

Commit

Permalink
Add two notes for correlated-expression optimizations.
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139263 91177308-0d34-0410-b5e6-96231b3b80d8
d0k committed Sep 7, 2011

Verified

This commit was signed with the committer’s verified signature.
jorenham Joren Hammudoglu
1 parent 0472e04 commit 3e328ec
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/Target/README.txt
Original file line number Diff line number Diff line change
@@ -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.

//===---------------------------------------------------------------------===//

0 comments on commit 3e328ec

Please sign in to comment.