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, i386]: Fix btrq peephole2


Hello!

As shown by attached testcase, btrq peephole2 generates wrong
immediate value for AND mask.

Attached patch fixes this problem and also improves btr{s,r,c}q
peephole2 patterns a bit.

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

    * config/i386/i386.md (absneg splitters with general regs): Use
    general_reg_operand predicate.
    (btsq peephole2): Use x86_64_immediate_operand to check if new
    value is suitable for immediate operand.  Generate emitted insn
    using RTL expressions.
    (btcq peephole2): Ditto.
    (btrq peephole2): Ditto.  Generate correct immediate operand
    for AND masking.

testsuite/ChangeLog:

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

    * gcc.target/i386/fabsneg-1.c New test.

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

Committed to mainline SVN, will be backported to gcc-6 and gcc-5 branches.

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]