amdgcn: Fix wrong-code bug in 64-bit masked add
authorAndrew Stubbs <ams@codesourcery.com>
Thu, 19 Mar 2020 17:44:59 +0000 (17:44 +0000)
committerAndrew Stubbs <ams@codesourcery.com>
Fri, 24 Apr 2020 19:02:58 +0000 (20:02 +0100)
2020-04-24  Andrew Stubbs  <ams@codesourcery.com>

gcc/
* config/gcn/gcn-valu.md (add<mode>_zext_dup2_exec): Fix merge
of high-part.
(add<mode>_sext_dup2_exec): Likewise.

gcc/ChangeLog
gcc/config/gcn/gcn-valu.md

index 4b6456e2416eeef9b12344af2cc93bf7dbc800d4..30e9675693fb0e747205e47c63d5b142fe0705f1 100644 (file)
@@ -1,3 +1,9 @@
+2020-04-24  Andrew Stubbs  <ams@codesourcery.com>
+
+       * config/gcn/gcn-valu.md (add<mode>_zext_dup2_exec): Fix merge
+       of high-part.
+       (add<mode>_sext_dup2_exec): Likewise.
+
 2020-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
 
        PR target/94710
index 0422e153cf33b674cdc9e89105ed0f2e78f72e19..d3badb4059c630217a3cdb8d1a790ae729d1a44b 100644 (file)
     rtx dsthi = gcn_operand_part (<MODE>mode, operands[0], 1);
     emit_insn (gen_vec_duplicate<vnsi>_exec
                (dsthi, gcn_operand_part (DImode, operands[2], 1),
-                gcn_gen_undef (<VnSI>mode), operands[4]));
+                gcn_operand_part (<MODE>mode, operands[3], 1),
+                operands[4]));
     emit_insn (gen_addc<vnsi>3_exec
                (dsthi, dsthi, const0_rtx, vcc, vcc,
                 gcn_operand_part (<MODE>mode, operands[3], 1),
     rtx dsthi = gcn_operand_part (<MODE>mode, operands[0], 1);
     emit_insn (gen_vec_duplicate<vnsi>_exec
                (dsthi, gcn_operand_part (DImode, operands[2], 1),
-                gcn_gen_undef (<VnSI>mode), operands[4]));
+               gcn_operand_part (<MODE>mode, operands[3], 1),
+               operands[4]));
     emit_insn (gen_addc<vnsi>3_exec
                (dsthi, dsthi, operands[5], vcc, vcc,
                 gcn_operand_part (<MODE>mode, operands[3], 1),