]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/114672 - WIDEN_MULT_PLUS_EXPR type mismatch
authorRichard Biener <rguenther@suse.de>
Wed, 10 Apr 2024 08:33:40 +0000 (10:33 +0200)
committerRichard Biener <rguenther@suse.de>
Wed, 10 Apr 2024 16:43:24 +0000 (18:43 +0200)
commit912753cc5f18d786e334dd425469fa7f93155661
tree85981b8aeaefe47944567a682cc7812174b9116d
parent5aa3fec38cc6f52285168b161bab1a869d864b44
tree-optimization/114672 - WIDEN_MULT_PLUS_EXPR type mismatch

The following makes sure to restrict WIDEN_MULT*_EXPR to a mode
precision final compute type as the mode is used to find the optab
and type checking chokes when seeing bit-precisions later which
would likely also not properly expanded to RTL.

PR tree-optimization/114672
* tree-ssa-math-opts.cc (convert_plusminus_to_widen): Only
allow mode-precision results.

* gcc.dg/torture/pr114672.c: New testcase.
gcc/testsuite/gcc.dg/torture/pr114672.c [new file with mode: 0644]
gcc/tree-ssa-math-opts.cc