]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: re PR target/91481 (POWER9 "DARN" RNG intrinsic produces repeated output...
authorSegher Boessenkool <segher@kernel.crashing.org>
Fri, 30 Aug 2019 14:23:55 +0000 (16:23 +0200)
committerSegher Boessenkool <segher@gcc.gnu.org>
Fri, 30 Aug 2019 14:23:55 +0000 (16:23 +0200)
Backport from trunk
2019-08-22  Segher Boessenkool  <segher@kernel.crashing.org>

PR target/91481
* config/rs6000/rs6000.md (unspec): Delete UNSPEC_DARN, UNSPEC_DARN_32,
and UNSPEC_DARN_RAW.
(unspecv): New enumerator values UNSPECV_DARN, UNSPECV_DARN_32, and
UNSPECV_DARN_RAW.
(darn_32): Use an unspec_volatile, and UNSPECV_DARN_32.
(darn_raw): Use an unspec_volatile, and UNSPECV_DARN_RAW.
(darn): Use an unspec_volatile, and UNSPECV_DARN.

From-SVN: r275185

gcc/ChangeLog
gcc/config/rs6000/rs6000.md

index 6d1b6e5ed4394de55cc38d469639dbb6f1f50471..ec53c7969f7c1267ea3f7c95221f349214e23b50 100644 (file)
@@ -1,3 +1,17 @@
+2019-08-30  Segher Boessenkool  <segher@kernel.crashing.org>
+
+       Backport from trunk
+       2019-08-22  Segher Boessenkool  <segher@kernel.crashing.org>
+
+       PR target/91481
+       * config/rs6000/rs6000.md (unspec): Delete UNSPEC_DARN, UNSPEC_DARN_32,
+       and UNSPEC_DARN_RAW.
+       (unspecv): New enumerator values UNSPECV_DARN, UNSPECV_DARN_32, and
+       UNSPECV_DARN_RAW.
+       (darn_32): Use an unspec_volatile, and UNSPECV_DARN_32.
+       (darn_raw): Use an unspec_volatile, and UNSPECV_DARN_RAW.
+       (darn): Use an unspec_volatile, and UNSPECV_DARN.
+
 2019-08-30  Segher Boessenkool  <segher@kernel.crashing.org>
 
        Backport from trunk
index 5583765f975e2e5039e08d6f443d2457785f4857..aebb2d5b2be01799b48173ca7a2e8b03b0c1dd24 100644 (file)
    UNSPEC_LSQ
    UNSPEC_FUSION_GPR
    UNSPEC_STACK_CHECK
-   UNSPEC_DARN
-   UNSPEC_DARN_32
-   UNSPEC_DARN_RAW
    UNSPEC_CMPRB
    UNSPEC_CMPRB2
    UNSPEC_CMPEQB
    UNSPECV_EH_RR               ; eh_reg_restore
    UNSPECV_ISYNC               ; isync instruction
    UNSPECV_MFTB                        ; move from time base
+   UNSPECV_DARN                        ; darn 1 (deliver a random number)
+   UNSPECV_DARN_32             ; darn 2
+   UNSPECV_DARN_RAW            ; darn 0
    UNSPECV_NLGR                        ; non-local goto receiver
    UNSPECV_MFFS                        ; Move from FPSCR
    UNSPECV_MTFSF               ; Move to FPSCR Fields
 
 (define_insn "darn_32"
   [(set (match_operand:SI 0 "register_operand" "=r")
-        (unspec:SI [(const_int 0)] UNSPEC_DARN_32))]
+        (unspec_volatile:SI [(const_int 0)] UNSPECV_DARN_32))]
   "TARGET_P9_MISC"
   "darn %0,0"
   [(set_attr "type" "integer")])
 
 (define_insn "darn_raw"
   [(set (match_operand:DI 0 "register_operand" "=r")
-        (unspec:DI [(const_int 0)] UNSPEC_DARN_RAW))]
+        (unspec_volatile:DI [(const_int 0)] UNSPECV_DARN_RAW))]
   "TARGET_P9_MISC && TARGET_64BIT"
   "darn %0,2"
   [(set_attr "type" "integer")])
 
 (define_insn "darn"
   [(set (match_operand:DI 0 "register_operand" "=r")
-        (unspec:DI [(const_int 0)] UNSPEC_DARN))]
+        (unspec_volatile:DI [(const_int 0)] UNSPECV_DARN))]
   "TARGET_P9_MISC && TARGET_64BIT"
   "darn %0,1"
   [(set_attr "type" "integer")])