]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
amdgcn: 64-bit not
authorAndrew Stubbs <ams@codesourcery.com>
Fri, 15 Jul 2022 14:28:44 +0000 (15:28 +0100)
committerAndrew Stubbs <ams@codesourcery.com>
Tue, 2 Aug 2022 10:46:20 +0000 (11:46 +0100)
This makes the auto-vectorizer happier when handling masks.

gcc/ChangeLog:

* config/gcn/gcn.md (one_cmpldi2): New.

(cherry picked from commit 8f4d9c1dedac54942ad28cc1647d48959bec9e77)

gcc/ChangeLog.omp
gcc/config/gcn/gcn.md

index 7728dd9b2bf66a85419b6fdc85eead2f23824da7..c1de5d4f4ac5e6073be0adb76199360cd19dac50 100644 (file)
@@ -1,3 +1,8 @@
+2022-08-02  Andrew Stubbs  <ams@codesourcery.com>
+
+       Backport from mainline:
+       * config/gcn/gcn.md (one_cmpldi2): New.
+
 2022-08-01  Tobias Burnus  <tobias@codesourcery.com>
 
        Backport from mainline:
index 0f9381c91941b11f2319707f4f7e80250651b84d..7197d2f5a2ead23a72ed41f4b346ddd936df9bb6 100644 (file)
 ;; }}}
 ;; {{{ ALU: generic 64-bit
 
+(define_insn_and_split "one_cmpldi2"
+  [(set (match_operand:DI 0 "register_operand"        "=Sg,    v")
+       (not:DI (match_operand:DI 1 "gcn_alu_operand" "SgA,vSvDB")))
+   (clobber (match_scratch:BI 2                              "=cs,    X"))]
+  ""
+  "#"
+  "reload_completed"
+  [(parallel [(set (match_dup 3) (not:SI (match_dup 4)))
+             (clobber (match_dup 2))])
+   (parallel [(set (match_dup 5) (not:SI (match_dup 6)))
+             (clobber (match_dup 2))])]
+  {
+    operands[3] = gcn_operand_part (DImode, operands[0], 0);
+    operands[4] = gcn_operand_part (DImode, operands[1], 0);
+    operands[5] = gcn_operand_part (DImode, operands[0], 1);
+    operands[6] = gcn_operand_part (DImode, operands[1], 1);
+  }
+  [(set_attr "type" "mult")]
+)
+
 (define_code_iterator vec_and_scalar64_com [and ior xor])
 
 (define_insn_and_split "<expander>di3"