[Bug tree-optimization/124555] [14/15/16 regression] ICE when building ffmpeg-8.0.1 (prepare_cmp_insn, at optabs.cc:460)
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Mar 18 13:20:13 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124555
--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:
https://gcc.gnu.org/g:c97e6d7be7d51cd812b2acde680cd9704bae3c70
commit r16-8155-gc97e6d7be7d51cd812b2acde680cd9704bae3c70
Author: Richard Biener <rguenther@suse.de>
Date: Wed Mar 18 10:15:00 2026 +0100
tree-optimization/124555 - guard abs patterns for vector support
The following adds missing vector support checks to abs producing
match.pd patterns. The g++.dg/absvect.C shows that we previously
then lowered this to non-vector unless you add -msse4 on x86_64
at least.
PR tree-optimization/124555
* match.pd ((A - B) >=/> 0 ? (A - B) : (B - A) -> abs (A - B)):
Guard the vector case with target_supports_op_p checks.
((A - B) <=/< 0 ? (A - B) : (B - A) -> -abs (A - B)): Likewise.
((type)A >=/> 0 ? A : -A -> abs (A)): Likewise.
((type)A <=/< 0 ? A : -A -> -abs (A)): Likewise.
* gcc.dg/torture/pr124555.c: New testcase.
* g++.dg/absvect.C: Restrict dump scan to x86-64 and force
-msse4 there.
More information about the Gcc-bugs
mailing list