]> git.ipfire.org Git - thirdparty/gcc.git/commit
amdgcn: Fix instruction generation for exp2 and log2 operations
authorKwok Cheung Yeung <kcy@codesourcery.com>
Thu, 3 Nov 2022 17:19:11 +0000 (17:19 +0000)
committerKwok Cheung Yeung <kcy@codesourcery.com>
Thu, 3 Nov 2022 18:33:09 +0000 (18:33 +0000)
commitdb6a9fe39ab08526b920af2b233b06860d286943
treee2513f168925356ae4acf48c283b0eda25d12340
parente177be86c7d327b9abd2441d52e3f240b3a488cd
amdgcn: Fix instruction generation for exp2 and log2 operations

The GCN instructions for the exp2 and log2 operations are v_exp_* and v_log_*
respectively, which unfortunately do not line up with the RTL naming
convention.  To deal with this, a new set of int attributes is now used when
generating the assembly for these instructions.

2022-11-03  Kwok Cheung Yeung  <kcy@codesourcery.com>

gcc/
* config/gcn/gcn-valu.md (math_unop_insn): New attribute.
(<math_unop><mode>2, <math_unop><mode>2<exec>, <math_unop><mode>2,
<math_unop><mode>2<exec>, *<math_unop><mode>2_insn,
*<math_unop><mode>2<exec>_insn): Use math_unop_insn to generate
assembler output.

gcc/testsuite/
* gcc.target/gcn/unsafe-math-1.c: New.
gcc/config/gcn/gcn-valu.md
gcc/testsuite/gcc.target/gcn/unsafe-math-1.c [new file with mode: 0644]