| commit | 1521298993a8184d40e4470769bfb6493be51bfc | [log] [tgz] |
|---|---|---|
| author | Chris Lattner <sabre@nondot.org> | Sun Sep 18 03:42:07 2005 +0000 |
| committer | Chris Lattner <sabre@nondot.org> | Sun Sep 18 03:42:07 2005 +0000 |
| tree | 94fb568586bb7752350a660a32e1fd40c4ae2ce6 | |
| parent | c6d63a9832669f24d00fd10baba570d19c156b3a [diff] |
Implement or.ll:test21. This teaches instcombine to be able to turn this:
struct {
unsigned int bit0:1;
unsigned int ubyte:31;
} sdata;
void foo() {
sdata.ubyte++;
}
into this:
foo:
add DWORD PTR [sdata], 2
ret
instead of this:
foo:
mov %EAX, DWORD PTR [sdata]
mov %ECX, %EAX
add %ECX, 2
and %ECX, -2
and %EAX, 1
or %EAX, %ECX
mov DWORD PTR [sdata], %EAX
ret
llvm-svn: 23376