https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126094
Bug ID: 126094
Summary: [17 Regression] several failures after r17-1974
Product: gcc
Version: 17.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: pinskia at gcc dot gnu.org
Target Milestone: ---
Target: aarch64
From:
https://gcc.gnu.org/pipermail/gcc-regression/2026-July/084051.html
FAIL: gcc.target/aarch64/mvn-cmeq0-1.c scan-assembler-not \\tcmeq\\t
FAIL: gcc.target/aarch64/mvn-cmeq0-1.c scan-assembler-not \\tnot\\t
FAIL: gcc.target/aarch64/mvn-cmeq0-1.c scan-assembler-times \\tcmtst\\t 1
FAIL: gcc.target/aarch64/vect-early-break-cbranch_4.c check-function-bodies f2
I suspect these all are the same failure.
aarch64-simd.md even has this:
;; Although neg (ne (and x y) 0) is the natural way of expressing a cmtst,
;; we don't have any insns using ne, and aarch64_vcond outputs
;; not (neg (eq (and x y) 0))
;; which is rewritten by simplify_rtx as
;; plus (eq (and x y) 0) -1.
But after r17-1974-g0895e430b5e5, simplify_rtx now creates `neg (ne (and x y)
0)`:
Trying 7 -> 8:
7: r107:V8HI=-r109:V8HI==const_vector
REG_DEAD r109:V8HI
8: r107:V8HI=~r107:V8HI
Failed to match this instruction:
(set (reg:V8HI 107 [ _6 ])
(neg:V8HI (ne:V8HI (reg:V8HI 109 [ abs_row0D.20346 ])
(const_vector:V8HI [
(const_int 0 [0]) repeated x8
]))))