]> git.ipfire.org Git - thirdparty/gcc.git/commit
amdgcn: Fix addsub bug
authorAndrew Stubbs <ams@codesourcery.com>
Wed, 26 Apr 2023 14:23:48 +0000 (15:23 +0100)
committerAndrew Stubbs <ams@codesourcery.com>
Thu, 27 Apr 2023 09:31:40 +0000 (10:31 +0100)
commita410f603fcaf2b963af5607eb359907fe273426e
treecc4bf9f06e2e99af95d53e4ca56c5937a0102e26
parentfe884508f6b92ae84ba888b1fc431327ed0b2388
amdgcn: Fix addsub bug

The vec_fmsubadd instuction actually had add twice, by mistake.

Also improve code-gen for all the complex patterns by using properly
undefined values.  Mostly this just prevents the compiler reserving space
in the stack frame.

gcc/ChangeLog:

* config/gcn/gcn-valu.md (cmul<conj_op><mode>3): Use gcn_gen_undef.
(cml<addsub_as><mode>4): Likewise.
(vec_addsub<mode>3): Likewise.
(cadd<rot><mode>3): Likewise.
(vec_fmaddsub<mode>4): Likewise.
(vec_fmsubadd<mode>4): Likewise, and use sub for the odd lanes.
gcc/ChangeLog.omp
gcc/config/gcn/gcn-valu.md