Matt Arsenault 31b1bdbd95 Add DAG combine for shl + add of constants.
Do
 (shl (add x, c1), c2) -> (add (shl x, c2), c1 << c2)

This is already done for multiplies, but since multiplies
by powers of two are turned into shifts, we also need
to handle it here.

This might want checks for isLegalAddImmediate to avoid
transforming an add of a legal immediate with one that isn't.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217610 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-11 17:34:19 +00:00
..
2014-01-23 18:49:33 +00:00
2014-08-06 20:27:55 +00:00
2014-06-18 17:57:29 +00:00
2014-07-15 20:18:31 +00:00
2014-06-18 22:03:45 +00:00
2014-08-02 02:26:51 +00:00
2014-09-10 21:44:27 +00:00
2014-08-06 20:27:55 +00:00
2013-12-10 21:11:55 +00:00
2014-06-20 17:06:05 +00:00
2014-06-06 01:20:28 +00:00
2014-05-02 15:41:47 +00:00
2014-06-20 17:06:05 +00:00
2014-06-20 17:06:07 +00:00
2014-02-04 17:18:37 +00:00
2014-09-05 14:26:54 +00:00
2013-12-20 05:11:55 +00:00
2013-12-14 00:38:04 +00:00
2014-08-29 16:01:14 +00:00
2014-09-03 23:24:35 +00:00
2014-09-02 21:45:50 +00:00
2014-06-15 21:08:54 +00:00
2014-07-15 21:44:37 +00:00
2014-07-15 21:44:37 +00:00
2014-05-09 16:42:19 +00:00
2014-06-18 12:27:13 +00:00
2014-09-06 20:37:56 +00:00
2014-06-18 12:27:17 +00:00
2014-06-18 12:27:15 +00:00
2014-06-24 23:33:04 +00:00
2013-11-06 17:36:04 +00:00
2014-06-22 21:42:58 +00:00
2014-01-11 21:06:00 +00:00
2014-07-21 14:01:10 +00:00

+==============================================================================+
| How to organize the lit tests                                                |
+==============================================================================+

- If you write a test for matching a single DAG opcode or intrinsic, it should
  go in a file called {opcode_name,intrinsic_name}.ll (e.g. fadd.ll)

- If you write a test that matches several DAG opcodes and checks for a single
  ISA instruction, then that test should go in a file called {ISA_name}.ll (e.g.
  bfi_int.ll

- For all other tests, use your best judgement for organizing tests and naming
  the files.

+==============================================================================+
| Naming conventions                                                           |
+==============================================================================+

- Use dash '-' and not underscore '_' to separate words in file names, unless
  the file is named after a DAG opcode or ISA instruction that has an
  underscore '_' in its name.