aboutsummaryrefslogtreecommitdiff
path: root/libcpp
diff options
context:
space:
mode:
authorUros Bizjak <ubizjak@gmail.com>2024-02-01 21:23:24 +0100
committerUros Bizjak <ubizjak@gmail.com>2024-02-01 21:25:05 +0100
commit44764984cf24e27cf7756cffd197283b9c62db8b (patch)
tree8337c8d1858b07b18a0af3c6e998a8ef4457fbea /libcpp
parente9b2f15d989addc1c2ad4604f5fa5ee1bda6023b (diff)
downloadgcc-44764984cf24e27cf7756cffd197283b9c62db8b.zip
gcc-44764984cf24e27cf7756cffd197283b9c62db8b.tar.gz
gcc-44764984cf24e27cf7756cffd197283b9c62db8b.tar.bz2
i386: Improve *cmp<dwi>_doubleword splitter [PR113701]
The fix for PR70321 introduced a splitter that split a doubleword comparison into a pair of XORs followed by an IOR to set the (zero) flags register. To help the reload, splitter forced SUBREG pieces of double-word input values to a pseudo, but this regressed gcc.target/i386/pr82580.c: int f0 (U x, U y) { return x == y; } from: xorq %rdx, %rdi xorq %rcx, %rsi xorl %eax, %eax orq %rsi, %rdi sete %al ret to: xchgq %rdi, %rsi movq %rdx, %r8 movq %rcx, %rax movq %rsi, %rdx movq %rdi, %rcx xorq %rax, %rcx xorq %r8, %rdx xorl %eax, %eax orq %rcx, %rdx sete %al ret To mitigate the regression, remove this legacy heuristic (workaround?). There have been many incremental changes and improvements to x86 TImode and register allocation, so this legacy workaround is not only no longer useful, but it actually hurts register allocation. The patched compiler now produces: xchgq %rdi, %rsi xorl %eax, %eax xorq %rsi, %rdx xorq %rdi, %rcx orq %rcx, %rdx sete %al ret PR target/113701 gcc/ChangeLog: * config/i386/i386.md (*cmp<dwi>_doubleword): Do not force SUBREG pieces to pseudos.
Diffstat (limited to 'libcpp')
0 files changed, 0 insertions, 0 deletions