[Patch][expand] Check gimple statement to improve LSHIFT_EXP expand
authorJiong Wang <jiong.wang@arm.com>
Wed, 19 Aug 2015 22:55:28 +0000 (22:55 +0000)
committerJiong Wang <jiwang@gcc.gnu.org>
Wed, 19 Aug 2015 22:55:28 +0000 (22:55 +0000)
commitb61a0d75fe479befe4bb92eb1447ed52b095599b
tree5aa74ee7132df7a44f46653bee3dce7ee3bdf5b7
parente0f6cba004eb94ef9a06c68d09160d8601503085
[Patch][expand] Check gimple statement to improve LSHIFT_EXP expand

This patch improves LSHIFT_EXP expand if the shift operand comes from sign
extension and the shift result across word_mode_size boundary. See code
comments for details.

2015-08-19  Jiong.Wang  <jiong.wang@arm.com>

gcc/
  * expr.c (expand_expr_real_2): Check gimple statement during
  LSHIFT_EXPR expand.

gcc/testsuite
  * gcc.dg/wide_shift_64_1.c: New testcase.
  * gcc.dg/wide_shift_128_1.c: Likewise.
  * gcc.target/aarch64/ashlti3_1.c: Likewise.

From-SVN: r227018
gcc/ChangeLog
gcc/expr.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/wide-shift-128.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/wide-shift-64.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/ashltidisi.c [new file with mode: 0644]