[expand] Fix for PR rtl-optimization/79121 incorrect expansion of extend plus left...
authorRichard Earnshaw <rearnsha@arm.com>
Thu, 19 Jan 2017 10:35:38 +0000 (10:35 +0000)
committerRichard Earnshaw <rearnsha@gcc.gnu.org>
Thu, 19 Jan 2017 10:35:38 +0000 (10:35 +0000)
commita57c520e2b884f8f52c03625b3ce2ca838a9427a
treec47101ed051263f16a24a2dc75fdb06684e3cf7a
parentea83dcf68d805065fc63a98056a0504ffcf5c2aa
[expand] Fix for PR rtl-optimization/79121 incorrect expansion of extend plus left shift

    When generating a shift from an extended value moving from one to two
    machine registers, the type of the right shift is for the most
    significant word should be determined by the signedness of the inner
    type, not the signedness of the result type.

    gcc:
        PR rtl-optimization/79121
        * expr.c (expand_expr_real_2, case LSHIFT_EXPR): Look at the signedness
        of the inner type when shifting an extended value.

    gcc/testsuite:
        * gcc.c-torture/execute/pr79121.c: New test.

From-SVN: r244613
gcc/ChangeLog
gcc/expr.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/execute/pr79121.c [new file with mode: 0644]