diff options
author | Hongyu Wang <hongyu.wang@intel.com> | 2023-10-25 15:07:29 +0800 |
---|---|---|
committer | Hongyu Wang <hongyu.wang@intel.com> | 2023-12-07 09:31:14 +0800 |
commit | 03655cd427b9d8e3b06c950255332eb988b0ade1 (patch) | |
tree | da2e38ecf188a52b594ddae42d225e64c760572f /gcc/expr.cc | |
parent | c95f67b8966dff4f7b22e794e410c5aa7490877a (diff) | |
download | gcc-03655cd427b9d8e3b06c950255332eb988b0ade1.zip gcc-03655cd427b9d8e3b06c950255332eb988b0ade1.tar.gz gcc-03655cd427b9d8e3b06c950255332eb988b0ade1.tar.bz2 |
[APX NDD] Support APX NDD for left shift insns
For left shift, there is an optimization TARGET_DOUBLE_WITH_ADD that shl
1 can be optimized to add. As NDD form of add requires src operand to
be register since NDD cannot take 2 memory src, we currently just keep
using NDD form shift instead of add.
The optimization TARGET_SHIFT1 will try to remove constant 1 to use shorter
opcode, but under NDD assembler will automatically use it whether $1 exist
or not, so do not involve NDD with it.
The doubleword insns for left shift calls ix86_expand_ashl, which assume
all shift related pattern has same operand[0] and operand[1]. For these pattern
we will support them in a standalone patch.
gcc/ChangeLog:
* config/i386/i386.md (*ashl<mode>3_1): Extend with new
alternatives to support NDD, limit the new alternative to
generate sal only, and adjust output template for NDD.
(*ashlsi3_1_zext): Likewise.
(*ashlhi3_1): Likewise.
(*ashlqi3_1): Likewise.
(*ashl<mode>3_cmp): Likewise.
(*ashlsi3_cmp_zext): Likewise, and use nonimmediate_operand for
operands[1] to accept memory input for NDD alternative.
(*ashl<mode>3_cconly): Likewise.
(*ashl<dwi>3_doubleword_highpart): Adjust codegen for NDD.
gcc/testsuite/ChangeLog:
* gcc.target/i386/apx-ndd.c: Add tests for sal.
Diffstat (limited to 'gcc/expr.cc')
0 files changed, 0 insertions, 0 deletions