OSDN Git Service

Try to reuse the value when lowering memset.
authorBenjamin Kramer <benny.kra@googlemail.com>
Sun, 2 Jan 2011 19:57:05 +0000 (19:57 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Sun, 2 Jan 2011 19:57:05 +0000 (19:57 +0000)
commit80220369b040dd9769e4c4b65d2d018210c3b240
tree86c89a65b154febbccfb8218b0b86dcda5252490
parent8c06aa1c597bb5c2c264a190bc35836f0a7b4cd5
Try to reuse the value when lowering memset.

This allows us to compile:
  void test(char *s, int a) {
    __builtin_memset(s, a, 15);
  }
into 1 mul + 3 stores instead of 3 muls + 3 stores.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122710 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
lib/Target/X86/README-X86-64.txt
test/CodeGen/X86/memset-2.ll