1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 20:51:52 +01:00

Add two notes for correlated-expression optimizations.

llvm-svn: 139263
This commit is contained in:
Benjamin Kramer 2011-09-07 22:49:26 +00:00
parent 6853bdde5b
commit f4e9cbfc05

View File

@ -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.
//===---------------------------------------------------------------------===//