aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vectorizer.h
diff options
context:
space:
mode:
authorHans-Peter Nilsson <hp@axis.com>2022-02-02 00:00:10 +0100
committerHans-Peter Nilsson <hp@axis.com>2022-02-02 01:20:03 +0100
commita58401d2e6d31eb8f0e4ded84b3dde28c98ba4da (patch)
tree10532508f4f6c8cfa4b961be953cd1e4657b325e /gcc/tree-vectorizer.h
parent4c4d0af4c94ccf0cfa74c8b13b8ec1029f57cd63 (diff)
downloadgcc-a58401d2e6d31eb8f0e4ded84b3dde28c98ba4da.zip
gcc-a58401d2e6d31eb8f0e4ded84b3dde28c98ba4da.tar.gz
gcc-a58401d2e6d31eb8f0e4ded84b3dde28c98ba4da.tar.bz2
cris: For expanded movsi, don't match operands we know will be reloaded
In a session investigating unexpected fallout from a change, I noticed reload needs one operand being a register to make an informed decision. It can happen that there's just a constant and a memory operand, as in: (insn 668 667 42 104 (parallel [ (set (mem:SI (plus:SI (reg/v/f:SI 347 [ fs ]) (const_int 168 [0xa8])) \ [1 fs_126(D)->regs.cfa_how+0 S4 A8]) (const_int 2 [0x2])) (clobber (reg:CC 19 dccr)) ]) "<...>/gcc/libgcc/unwind-dw2.c":1121:21 22 {*movsi_internal} (expr_list:REG_UNUSED (reg:CC 19 dccr) (nil))) This was helpfully created by combine. When this happens, reload can't check for costs and preferred register classes, (both operands will start with NO_REGS as the preferred class) and will default to the constraints order in the insn in reload. (Which also does its own temporary merge in find_reloads, but that's a different story.) Better don't match the simple cases. Beware that subregs have to be matched. I'm doing this just for word_mode (SI) for now, but may repeat this for the other valid modes as well. In particular, that goes for DImode as I see the expanded movdi does *almost* this, but uses register_operand instead of REG_S_P (from cris.h). Using REG_S_P is the right choice here because register_operand also matches (subreg (mem ...) ...) *until* reload is done. By itself it's just a sub-0.1% performance win (coremark). Also removing a stale comment. gcc: * config/cris/cris.md ("*movsi_internal<setcc><setnz><setnzvc>"): Conditionalize on (sub-)register operands or operand 1 being 0.
Diffstat (limited to 'gcc/tree-vectorizer.h')
0 files changed, 0 insertions, 0 deletions