This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH, rtl-optimization]: Fix PR77452, ICE: in plus_constant, at explow.c


Hello!

As shown in the PR [1], combine is able to simplify lowpart
CONST_VECTOR constant pool reference to its inner-mode reference.
However, plus_constant was not able to extract the constant from
narrowed access.

Attached patch teaches plus_constant how to handle this situation.

2016-09-04  Uros Bizjak  <ubizjak@gmail.com>

    PR rtl-optimization/77452
    * explow.c (plus_constant) <case MEM>: Extract scalar constant from
    inner-mode reference to a CONST_VECTOR constant in the constant pool.

2016-09-04  Uros Bizjak  <ubizjak@gmail.com>

testsuite/ChangeLog:

    PR rtl-optimization/77452
    * gcc.target/i386/pr77452.c: New test.

Patch was bootstrapped and regression tested on x86_64-linux-gnu {,-m32}.

OK for mainline and gcc-6 branch?

[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77452

Uros.

Attachment: p.diff.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]