Implement or.ll:test21. This teaches instcombine to be able to turn this:
authorChris Lattner <sabre@nondot.org>
Sun, 18 Sep 2005 03:42:07 +0000 (03:42 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 18 Sep 2005 03:42:07 +0000 (03:42 +0000)
commite9bed7d10759e86634793d6589f894d1e44f43e8
treeac7bce9fb8289eeaae35ed991d17d26898a7b9f5
parent1e122d1dc297f9386c11916df86fa0245b61041f
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23376 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/InstructionCombining.cpp