diff -Nrcpad gcc-13-20250724/LAST_UPDATED gcc-13-20250731/LAST_UPDATED
*** gcc-13-20250724/LAST_UPDATED	Thu Jul 24 22:33:37 2025
--- gcc-13-20250731/LAST_UPDATED	Thu Jul 31 22:34:45 2025
***************
*** 1 ****
! Obtained from git: releases/gcc-13 revision 02a795febc029055238337e691e3931e685c15c7
--- 1 ----
! Obtained from git: releases/gcc-13 revision d026df50a6d77d261e614a9f6b20ac2ee8f26d19
diff -Nrcpad gcc-13-20250724/MD5SUMS gcc-13-20250731/MD5SUMS
*** gcc-13-20250724/MD5SUMS	Thu Jul 24 22:33:44 2025
--- gcc-13-20250731/MD5SUMS	Thu Jul 31 22:34:57 2025
***************
*** 1,5 ****
  # This file contains the MD5 checksums of the files in the
! # gcc-13-20250724.tar.xz tarball.
  #
  # Besides verifying that all files in the tarball were correctly expanded,
  # it also can be used to determine if any files have changed since the
--- 1,5 ----
  # This file contains the MD5 checksums of the files in the
! # gcc-13-20250731.tar.xz tarball.
  #
  # Besides verifying that all files in the tarball were correctly expanded,
  # it also can be used to determine if any files have changed since the
*************** d32239bcb673463ab874e80d47fae504  COPYIN
*** 21,27 ****
  fd4ecdf5d672efe2b0e409aca9cf9446  ChangeLog.jit
  09538b708302f1735f6fa05b622ecf5e  ChangeLog.tree-ssa
  24ab760126489e69436a43185dc3d202  INSTALL/README
! ff53f94435acd60526de471812c88c31  LAST_UPDATED
  81b3330d422f3ce1ef8b720dfae35068  MAINTAINERS
  2b61ddbd876fa839639a7ca551773426  Makefile.def
  5d2d6a74f897f8158d37f5f2ec6877ce  Makefile.in
--- 21,27 ----
  fd4ecdf5d672efe2b0e409aca9cf9446  ChangeLog.jit
  09538b708302f1735f6fa05b622ecf5e  ChangeLog.tree-ssa
  24ab760126489e69436a43185dc3d202  INSTALL/README
! 6eb7f97fb013dc0e2023dd4b004fe110  LAST_UPDATED
  81b3330d422f3ce1ef8b720dfae35068  MAINTAINERS
  2b61ddbd876fa839639a7ca551773426  Makefile.def
  5d2d6a74f897f8158d37f5f2ec6877ce  Makefile.in
*************** a22e70b3f29292d0e628450f4bb11e62  fixinc
*** 475,481 ****
  a916467b91076e631dd8edb7424769c7  gcc/COPYING.LIB
  d32239bcb673463ab874e80d47fae504  gcc/COPYING3
  6a6a8e020838b23406c81b19c1d46df6  gcc/COPYING3.LIB
! a0726d09da778889ca0ce8e09d1a107f  gcc/ChangeLog
  a3b63c675afa7a655cc2bfa8a907af79  gcc/ChangeLog-1997
  d9a88529352a010253c2e8fb1ed6023b  gcc/ChangeLog-1998
  240f08f81cb4699e8b49347db38233db  gcc/ChangeLog-1999
--- 475,481 ----
  a916467b91076e631dd8edb7424769c7  gcc/COPYING.LIB
  d32239bcb673463ab874e80d47fae504  gcc/COPYING3
  6a6a8e020838b23406c81b19c1d46df6  gcc/COPYING3.LIB
! 1f6d6b7bb80c26017275ea3e82e23234  gcc/ChangeLog
  a3b63c675afa7a655cc2bfa8a907af79  gcc/ChangeLog-1997
  d9a88529352a010253c2e8fb1ed6023b  gcc/ChangeLog-1998
  240f08f81cb4699e8b49347db38233db  gcc/ChangeLog-1999
*************** fb3fadb88e1d2b3b640cfaaa5ff11780  gcc/Ch
*** 510,516 ****
  3eb07e0b2e542409bf73d359f7f65609  gcc/ChangeLog.ptr
  e13638e26743ba41e6011b76cc00d9a9  gcc/ChangeLog.tree-ssa
  739ab47f6425bcea1d05e4fc0542de54  gcc/ChangeLog.tuples
! 1624f1f7f1b69acde21f759c9c792f00  gcc/DATESTAMP
  d41d8cd98f00b204e9800998ecf8427e  gcc/DEV-PHASE
  eb92e1ff5e982ca07e173e0eb286d243  gcc/FSFChangeLog
  30e1e33411566388b3164558482dc5e6  gcc/FSFChangeLog.10
--- 510,516 ----
  3eb07e0b2e542409bf73d359f7f65609  gcc/ChangeLog.ptr
  e13638e26743ba41e6011b76cc00d9a9  gcc/ChangeLog.tree-ssa
  739ab47f6425bcea1d05e4fc0542de54  gcc/ChangeLog.tuples
! e34857905149e003b7b3a8a724fccf06  gcc/DATESTAMP
  d41d8cd98f00b204e9800998ecf8427e  gcc/DEV-PHASE
  eb92e1ff5e982ca07e173e0eb286d243  gcc/FSFChangeLog
  30e1e33411566388b3164558482dc5e6  gcc/FSFChangeLog.10
*************** ffb1b3ecba72997c3e6804714698295d  gcc/co
*** 3915,3921 ****
  15146e6cff34da8c1205b0df0813ccb0  gcc/config/i386/i386-protos.h
  2c1a1dada63d12c6ab128b7c403d03b9  gcc/config/i386/i386.cc
  0c9ab892c366f3f64c88a3562987a4ba  gcc/config/i386/i386.h
! f6a6b03b5d8ef02a68a54d21a640e05f  gcc/config/i386/i386.md
  c32251e85ab598cb51e89383639566bb  gcc/config/i386/i386.opt
  faa318618e52a0740019e9aa0764b007  gcc/config/i386/i386elf.h
  7c89dc80159b83f67c1fa47a10c88c13  gcc/config/i386/ia32intrin.h
--- 3915,3921 ----
  15146e6cff34da8c1205b0df0813ccb0  gcc/config/i386/i386-protos.h
  2c1a1dada63d12c6ab128b7c403d03b9  gcc/config/i386/i386.cc
  0c9ab892c366f3f64c88a3562987a4ba  gcc/config/i386/i386.h
! 34ac6019772ce9f98393f897917b0607  gcc/config/i386/i386.md
  c32251e85ab598cb51e89383639566bb  gcc/config/i386/i386.opt
  faa318618e52a0740019e9aa0764b007  gcc/config/i386/i386elf.h
  7c89dc80159b83f67c1fa47a10c88c13  gcc/config/i386/ia32intrin.h
*************** b829ed0032c899e107be2db349c913f3  gcc/ta
*** 7637,7643 ****
  811da275a2b9d3186a6decf96c01b0ed  gcc/targhooks.cc
  edb193a32070c4a7626fb75382def9b9  gcc/targhooks.h
  f39fcaa8197187283ccfed40107b426d  gcc/testsuite/.gitattributes
! 431a85961c228cb00b23256589664031  gcc/testsuite/ChangeLog
  862f04afbd87da2cc6bc432c3f28430f  gcc/testsuite/ChangeLog-1993-2007
  029a5d8dacd25eb5d4711452ac448e5b  gcc/testsuite/ChangeLog-2008
  13ac28c41d51b66b4ec40dba6bd50f39  gcc/testsuite/ChangeLog-2009
--- 7637,7643 ----
  811da275a2b9d3186a6decf96c01b0ed  gcc/targhooks.cc
  edb193a32070c4a7626fb75382def9b9  gcc/targhooks.h
  f39fcaa8197187283ccfed40107b426d  gcc/testsuite/.gitattributes
! e41ce2bcb883117f660d3634ec37d366  gcc/testsuite/ChangeLog
  862f04afbd87da2cc6bc432c3f28430f  gcc/testsuite/ChangeLog-1993-2007
  029a5d8dacd25eb5d4711452ac448e5b  gcc/testsuite/ChangeLog-2008
  13ac28c41d51b66b4ec40dba6bd50f39  gcc/testsuite/ChangeLog-2009
*************** f22f68b0840ac6ff981a038296834407  gcc/te
*** 68993,68999 ****
  b72099cd966e9c576a224799821d5d28  gcc/testsuite/gcc.target/i386/cold-attribute-1.c
  0167fa6749ad93cf0251a4b9260fbccd  gcc/testsuite/gcc.target/i386/cold-attribute-2.c
  c1eab7ffc4e6134b9c680fe0c2920314  gcc/testsuite/gcc.target/i386/cold-attribute-3.c
! dcc5b76590328fd9f7c421fcb66d52d6  gcc/testsuite/gcc.target/i386/cold-attribute-4.c
  6475e870c428b4aeb9a5a7ed5149bb30  gcc/testsuite/gcc.target/i386/combine-mul.c
  51ddf79878f8a3a62bc3a456a718ddb8  gcc/testsuite/gcc.target/i386/compress-float-387-pic.c
  f5b6283707f17b1db37120fd03d9ecf7  gcc/testsuite/gcc.target/i386/compress-float-387.c
--- 68993,68999 ----
  b72099cd966e9c576a224799821d5d28  gcc/testsuite/gcc.target/i386/cold-attribute-1.c
  0167fa6749ad93cf0251a4b9260fbccd  gcc/testsuite/gcc.target/i386/cold-attribute-2.c
  c1eab7ffc4e6134b9c680fe0c2920314  gcc/testsuite/gcc.target/i386/cold-attribute-3.c
! fb80b8e91abc0725f03bd2c87f0692c9  gcc/testsuite/gcc.target/i386/cold-attribute-4.c
  6475e870c428b4aeb9a5a7ed5149bb30  gcc/testsuite/gcc.target/i386/combine-mul.c
  51ddf79878f8a3a62bc3a456a718ddb8  gcc/testsuite/gcc.target/i386/compress-float-387-pic.c
  f5b6283707f17b1db37120fd03d9ecf7  gcc/testsuite/gcc.target/i386/compress-float-387.c
*************** e12ace984bb5ee071207675ca43c7e58  gcc/te
*** 70260,70265 ****
--- 70260,70270 ----
  991b7f7f44e28179f98bb458fdb69ea6  gcc/testsuite/gcc.target/i386/pr11877-2.c
  e7f6a568e551d3786797d6f56294b949  gcc/testsuite/gcc.target/i386/pr11877.c
  61d1a6c7aba6d7071f54e24b6dc92da7  gcc/testsuite/gcc.target/i386/pr118776.c
+ 1404641b6882eb8151341efedd467313  gcc/testsuite/gcc.target/i386/pr120427-1.c
+ b912addc770944f54b5baa8db2467d9d  gcc/testsuite/gcc.target/i386/pr120427-2.c
+ c87152a8a84d546309327b3da89eb566  gcc/testsuite/gcc.target/i386/pr120427-3.c
+ f5a1252b1fe24ea2b97ff3762c399ed9  gcc/testsuite/gcc.target/i386/pr120427-4.c
+ 16984aa55364473d08d90334f60bf59e  gcc/testsuite/gcc.target/i386/pr120427-5.c
  e33b63cd8f6d60b286b2286424f25714  gcc/testsuite/gcc.target/i386/pr120908.c
  b03b1d817538a863277c823b5e4cdf75  gcc/testsuite/gcc.target/i386/pr12092-1.c
  f99f88a6e994ad6e55e065e41bc58f8f  gcc/testsuite/gcc.target/i386/pr12329.c
*************** d128b18a20f2a55978e519508f48f1ae  gcc/te
*** 76876,76882 ****
  cdde8569ebb2ca104f942dd183c12fa2  gcc/testsuite/gcc.target/powerpc/vsx-builtin-4.c
  9bacca313420b00c643d89ba549c4c57  gcc/testsuite/gcc.target/powerpc/vsx-builtin-5.c
  34d5d7bd0a57589cc1249d19cac92fbf  gcc/testsuite/gcc.target/powerpc/vsx-builtin-6.c
! b85a4370874d0558ca845f7c6e5f0a6d  gcc/testsuite/gcc.target/powerpc/vsx-builtin-7.c
  6c165a9a07d4fa8f16289c23ae6a58fd  gcc/testsuite/gcc.target/powerpc/vsx-builtin-8.c
  33633751eb0bfabbb2951a0070770508  gcc/testsuite/gcc.target/powerpc/vsx-builtin-9a.c
  2e9c4b2355be46611bfe42e4a9f8d1f3  gcc/testsuite/gcc.target/powerpc/vsx-builtin-9b.c
--- 76881,76887 ----
  cdde8569ebb2ca104f942dd183c12fa2  gcc/testsuite/gcc.target/powerpc/vsx-builtin-4.c
  9bacca313420b00c643d89ba549c4c57  gcc/testsuite/gcc.target/powerpc/vsx-builtin-5.c
  34d5d7bd0a57589cc1249d19cac92fbf  gcc/testsuite/gcc.target/powerpc/vsx-builtin-6.c
! a3ba74a674fd49b3c22b51c6c608e158  gcc/testsuite/gcc.target/powerpc/vsx-builtin-7.c
  6c165a9a07d4fa8f16289c23ae6a58fd  gcc/testsuite/gcc.target/powerpc/vsx-builtin-8.c
  33633751eb0bfabbb2951a0070770508  gcc/testsuite/gcc.target/powerpc/vsx-builtin-9a.c
  2e9c4b2355be46611bfe42e4a9f8d1f3  gcc/testsuite/gcc.target/powerpc/vsx-builtin-9b.c
*************** a32b38d2eae806bfe95f3e089a711f7a  libsan
*** 113200,113206 ****
  6e3ba9b2a5302ee4e0b833e4cc174db2  libsanitizer/sanitizer_common/sanitizer_common.h
  820bd5f9d0b610aeee0ddc864394a83f  libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc
  873ecc8932cb8410c4e2b06ea4fd99ff  libsanitizer/sanitizer_common/sanitizer_common_interceptors_format.inc
! aa961fb0d47d9369601c5aa4bd24ea02  libsanitizer/sanitizer_common/sanitizer_common_interceptors_ioctl.inc
  c664d5fb1514c978d28a6a62b2040b53  libsanitizer/sanitizer_common/sanitizer_common_interceptors_netbsd_compat.inc
  fda3dee294d9edce69f269af077bbd80  libsanitizer/sanitizer_common/sanitizer_common_interceptors_vfork_aarch64.inc.S
  b4b4ed1f1a36cce44031fd0b4a1a141f  libsanitizer/sanitizer_common/sanitizer_common_interceptors_vfork_arm.inc.S
--- 113205,113211 ----
  6e3ba9b2a5302ee4e0b833e4cc174db2  libsanitizer/sanitizer_common/sanitizer_common.h
  820bd5f9d0b610aeee0ddc864394a83f  libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc
  873ecc8932cb8410c4e2b06ea4fd99ff  libsanitizer/sanitizer_common/sanitizer_common_interceptors_format.inc
! f7ca723d15d4d448c700727f05b86537  libsanitizer/sanitizer_common/sanitizer_common_interceptors_ioctl.inc
  c664d5fb1514c978d28a6a62b2040b53  libsanitizer/sanitizer_common/sanitizer_common_interceptors_netbsd_compat.inc
  fda3dee294d9edce69f269af077bbd80  libsanitizer/sanitizer_common/sanitizer_common_interceptors_vfork_aarch64.inc.S
  b4b4ed1f1a36cce44031fd0b4a1a141f  libsanitizer/sanitizer_common/sanitizer_common_interceptors_vfork_arm.inc.S
*************** b582d1c8ad1dfab45211cbb7c25cf5f6  libsan
*** 113277,113284 ****
  363c19d7d7061beabfcc5393b85ef479  libsanitizer/sanitizer_common/sanitizer_platform_limits_netbsd.h
  d41d8cd98f00b204e9800998ecf8427e  libsanitizer/sanitizer_common/sanitizer_platform_limits_openbsd.cpp
  d41d8cd98f00b204e9800998ecf8427e  libsanitizer/sanitizer_common/sanitizer_platform_limits_openbsd.h
! f59aa2137df87f1dd3e7564e8ca41b55  libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp
! ce8a0aaa4129f14a6b70fe701a4aee99  libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
  711b54008ada7faff939a95e325b185b  libsanitizer/sanitizer_common/sanitizer_platform_limits_solaris.cpp
  ab1ad414331f77e459da9a32b756cbac  libsanitizer/sanitizer_common/sanitizer_platform_limits_solaris.h
  1019f8f3de270256a0b3ed857645dec8  libsanitizer/sanitizer_common/sanitizer_posix.cpp
--- 113282,113289 ----
  363c19d7d7061beabfcc5393b85ef479  libsanitizer/sanitizer_common/sanitizer_platform_limits_netbsd.h
  d41d8cd98f00b204e9800998ecf8427e  libsanitizer/sanitizer_common/sanitizer_platform_limits_openbsd.cpp
  d41d8cd98f00b204e9800998ecf8427e  libsanitizer/sanitizer_common/sanitizer_platform_limits_openbsd.h
! 7434c2aad61b0cd2433946a556a1b7cf  libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp
! 40a8327e0c94fa88314fad7bb6d05547  libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
  711b54008ada7faff939a95e325b185b  libsanitizer/sanitizer_common/sanitizer_platform_limits_solaris.cpp
  ab1ad414331f77e459da9a32b756cbac  libsanitizer/sanitizer_common/sanitizer_platform_limits_solaris.h
  1019f8f3de270256a0b3ed857645dec8  libsanitizer/sanitizer_common/sanitizer_posix.cpp
diff -Nrcpad gcc-13-20250724/gcc/ChangeLog gcc-13-20250731/gcc/ChangeLog
*** gcc-13-20250724/gcc/ChangeLog	Thu Jul 24 22:32:06 2025
--- gcc-13-20250731/gcc/ChangeLog	Thu Jul 31 22:32:27 2025
***************
*** 1,3 ****
--- 1,16 ----
+ 2025-07-29  H.J. Lu  <hjl.tools@gmail.com>
+ 
+ 	Backported from master:
+ 	2025-06-19  H.J. Lu  <hjl.tools@gmail.com>
+ 
+ 	PR target/120427
+ 	* config/i386/i386.md (*mov<mode>_and): Changed to
+ 	define_insn_and_split.  Split it to "mov $0,mem" if not -Oz.
+ 	(*mov<mode>_or): Changed to define_insn_and_split.  Split it
+ 	to "mov $-1,mem" if not -Oz.
+ 	(peephole2): Don't transform "mov $-1,reg" to "push $-1; pop reg"
+ 	for -Oz since it will be transformed to "or $-1,reg".
+ 
  2025-07-17  H.J. Lu  <hjl.tools@gmail.com>
  
  	Backported from master:
diff -Nrcpad gcc-13-20250724/gcc/DATESTAMP gcc-13-20250731/gcc/DATESTAMP
*** gcc-13-20250724/gcc/DATESTAMP	Thu Jul 24 22:32:06 2025
--- gcc-13-20250731/gcc/DATESTAMP	Thu Jul 31 22:32:28 2025
***************
*** 1 ****
! 20250724
--- 1 ----
! 20250731
diff -Nrcpad gcc-13-20250724/gcc/config/i386/i386.md gcc-13-20250731/gcc/config/i386/i386.md
*** gcc-13-20250724/gcc/config/i386/i386.md	Thu Jul 24 22:32:07 2025
--- gcc-13-20250731/gcc/config/i386/i386.md	Thu Jul 31 22:32:34 2025
***************
*** 2184,2205 ****
     (set_attr "mode" "SI")
     (set_attr "length_immediate" "0")])
  
! (define_insn "*mov<mode>_and"
    [(set (match_operand:SWI248 0 "memory_operand" "=m")
  	(match_operand:SWI248 1 "const0_operand"))
     (clobber (reg:CC FLAGS_REG))]
    "reload_completed"
    "and{<imodesuffix>}\t{%1, %0|%0, %1}"
    [(set_attr "type" "alu1")
     (set_attr "mode" "<MODE>")
     (set_attr "length_immediate" "1")])
  
! (define_insn "*mov<mode>_or"
    [(set (match_operand:SWI248 0 "nonimmediate_operand" "=rm")
  	(match_operand:SWI248 1 "constm1_operand"))
     (clobber (reg:CC FLAGS_REG))]
    "reload_completed"
    "or{<imodesuffix>}\t{%1, %0|%0, %1}"
    [(set_attr "type" "alu1")
     (set_attr "mode" "<MODE>")
     (set_attr "length_immediate" "1")])
--- 2184,2215 ----
     (set_attr "mode" "SI")
     (set_attr "length_immediate" "0")])
  
! ;; Generate shorter "and $0,mem" for -Oz.  Split it to "mov $0,mem"
! ;; otherwise.
! (define_insn_and_split "*mov<mode>_and"
    [(set (match_operand:SWI248 0 "memory_operand" "=m")
  	(match_operand:SWI248 1 "const0_operand"))
     (clobber (reg:CC FLAGS_REG))]
    "reload_completed"
    "and{<imodesuffix>}\t{%1, %0|%0, %1}"
+   "&& !(optimize_insn_for_size_p () && optimize_size > 1)"
+   [(set (match_dup 0) (match_dup 1))]
+   ""
    [(set_attr "type" "alu1")
     (set_attr "mode" "<MODE>")
     (set_attr "length_immediate" "1")])
  
! ;; Generate shorter "or $-1,mem" for -Oz.  Split it to "mov $-1,mem"
! ;; otherwise.
! (define_insn_and_split "*mov<mode>_or"
    [(set (match_operand:SWI248 0 "nonimmediate_operand" "=rm")
  	(match_operand:SWI248 1 "constm1_operand"))
     (clobber (reg:CC FLAGS_REG))]
    "reload_completed"
    "or{<imodesuffix>}\t{%1, %0|%0, %1}"
+   "&& !(optimize_insn_for_size_p () && optimize_size > 1)"
+   [(set (match_dup 0) (match_dup 1))]
+   ""
    [(set_attr "type" "alu1")
     (set_attr "mode" "<MODE>")
     (set_attr "length_immediate" "1")])
***************
*** 2680,2685 ****
--- 2690,2697 ----
  	(match_operand:SWI248 1 "const_int_operand"))]
    "optimize_insn_for_size_p () && optimize_size > 1
     && operands[1] != const0_rtx
+    && (operands[1] != constm1_rtx
+        || (<MODE>mode == DImode && LEGACY_INT_REG_P (operands[0])))
     && IN_RANGE (INTVAL (operands[1]), -128, 127)
     && !ix86_red_zone_used
     && REGNO (operands[0]) != SP_REG"
diff -Nrcpad gcc-13-20250724/gcc/testsuite/ChangeLog gcc-13-20250731/gcc/testsuite/ChangeLog
*** gcc-13-20250724/gcc/testsuite/ChangeLog	Thu Jul 24 22:32:08 2025
--- gcc-13-20250731/gcc/testsuite/ChangeLog	Thu Jul 31 22:32:36 2025
***************
*** 1,3 ****
--- 1,15 ----
+ 2025-07-29  H.J. Lu  <hjl.tools@gmail.com>
+ 
+ 	Backported from master:
+ 	2025-06-19  H.J. Lu  <hjl.tools@gmail.com>
+ 
+ 	PR target/120427
+ 	* gcc.target/i386/cold-attribute-4.c: Compile with -Oz.
+ 	* gcc.target/i386/pr120427-1.c: New test.
+ 	* gcc.target/i386/pr120427-2.c: Likewise.
+ 	* gcc.target/i386/pr120427-3.c: Likewise.
+ 	* gcc.target/i386/pr120427-4.c: Likewise.
+ 
  2025-07-17  H.J. Lu  <hjl.tools@gmail.com>
  
  	Backported from master:
diff -Nrcpad gcc-13-20250724/gcc/testsuite/gcc.target/i386/cold-attribute-4.c gcc-13-20250731/gcc/testsuite/gcc.target/i386/cold-attribute-4.c
*** gcc-13-20250724/gcc/testsuite/gcc.target/i386/cold-attribute-4.c	Thu Jul 24 22:32:27 2025
--- gcc-13-20250731/gcc/testsuite/gcc.target/i386/cold-attribute-4.c	Thu Jul 31 22:33:18 2025
***************
*** 1,5 ****
  /* { dg-do compile } */
! /* { dg-options "-O2" } */
  #include <string.h>
  
  int
--- 1,5 ----
  /* { dg-do compile } */
! /* { dg-options "-Oz" } */
  #include <string.h>
  
  int
diff -Nrcpad gcc-13-20250724/gcc/testsuite/gcc.target/i386/pr120427-1.c gcc-13-20250731/gcc/testsuite/gcc.target/i386/pr120427-1.c
*** gcc-13-20250724/gcc/testsuite/gcc.target/i386/pr120427-1.c	Thu Jan  1 00:00:00 1970
--- gcc-13-20250731/gcc/testsuite/gcc.target/i386/pr120427-1.c	Thu Jul 31 22:33:18 2025
***************
*** 0 ****
--- 1,28 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O2 -mtune=sapphirerapids" } */
+ /* { dg-final { scan-assembler-not "and\[lq\]?\[\\t \]+\\\$0, \[0-9\]*\\(" } } */
+ 
+ struct __pthread_mutex_s
+ {
+   int __lock;
+   unsigned int __count;
+   int __owner;
+   unsigned int __nusers;
+   int __kind;
+   short __spins;
+   short __elision;
+   void *p[2];
+ };
+ typedef union
+ {
+   struct __pthread_mutex_s __data;
+   char __size[40];
+   long int __align;
+ } pthread_mutex_t;
+ typedef struct { pthread_mutex_t mutex; } __rtld_lock_recursive_t;
+ void
+ foo (__rtld_lock_recursive_t *lock, int i)
+ {
+   lock[i] = (__rtld_lock_recursive_t) {{ { 0, 0, 0, 0, 1,
+       0, 0, { ((void *)0) , ((void *)0) } } }};
+ }
diff -Nrcpad gcc-13-20250724/gcc/testsuite/gcc.target/i386/pr120427-2.c gcc-13-20250731/gcc/testsuite/gcc.target/i386/pr120427-2.c
*** gcc-13-20250724/gcc/testsuite/gcc.target/i386/pr120427-2.c	Thu Jan  1 00:00:00 1970
--- gcc-13-20250731/gcc/testsuite/gcc.target/i386/pr120427-2.c	Thu Jul 31 22:33:18 2025
***************
*** 0 ****
--- 1,28 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O2 -mtune=sapphirerapids" } */
+ /* { dg-final { scan-assembler-not "or\[lq\]?\[\\t \]+\\\$-1, \[0-9\]*\\(" } } */
+ 
+ struct __pthread_mutex_s
+ {
+   int __lock;
+   unsigned int __count;
+   int __owner;
+   unsigned int __nusers;
+   int __kind;
+   short __spins;
+   short __elision;
+   void *p[2];
+ };
+ typedef union
+ {
+   struct __pthread_mutex_s __data;
+   char __size[40];
+   long int __align;
+ } pthread_mutex_t;
+ typedef struct { pthread_mutex_t mutex; } __rtld_lock_recursive_t;
+ void
+ foo (__rtld_lock_recursive_t *lock, int i)
+ {
+   lock[i] = (__rtld_lock_recursive_t) {{ { -1, -1, -1, -1, 1,
+       -1, -1, { ((void *)-1) , ((void *)-1) } } }};
+ }
diff -Nrcpad gcc-13-20250724/gcc/testsuite/gcc.target/i386/pr120427-3.c gcc-13-20250731/gcc/testsuite/gcc.target/i386/pr120427-3.c
*** gcc-13-20250724/gcc/testsuite/gcc.target/i386/pr120427-3.c	Thu Jan  1 00:00:00 1970
--- gcc-13-20250731/gcc/testsuite/gcc.target/i386/pr120427-3.c	Thu Jul 31 22:33:18 2025
***************
*** 0 ****
--- 1,45 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O2" } */
+ 
+ typedef int SItype __attribute__ ((mode (SI)));
+ typedef unsigned int USItype __attribute__ ((mode (SI)));
+ typedef unsigned int UDItype __attribute__ ((mode (DI)));
+ typedef UDItype __attribute__ ((__may_alias__)) bar_t;
+ 
+ static inline __attribute__((__always_inline__)) SItype
+ bar (const bar_t **p, SItype prec)
+ {
+   bar_t mslimb = 0;
+   SItype i = 20;
+   SItype n = ((USItype) prec) % 4;
+   if (n)
+     {
+       prec -= n;
+       if (prec == 0)
+ 	return 1;
+       mslimb = (*p)[i];
+     }
+   while (mslimb == 0)
+     {
+       prec -= 4;
+       if (prec == 0)
+ 	return 1;
+       --i;
+       mslimb = (*p)[i];
+     }
+   return prec;
+ }
+ UDItype
+ foo (const bar_t *i, SItype iprec)
+ {
+   iprec = bar (&i, iprec);
+   USItype aiprec = iprec < 0 ? -iprec : iprec;
+   bar_t msb = *i;
+   UDItype mantissa = 0;
+   if (aiprec % 4)
+     msb &= ((bar_t) 1 << aiprec) - 1;
+   if (aiprec >= 54)
+     mantissa = (UDItype) msb << 32;
+ 
+   return (mantissa ^ (UDItype) 0x20000000000000);
+ }
diff -Nrcpad gcc-13-20250724/gcc/testsuite/gcc.target/i386/pr120427-4.c gcc-13-20250731/gcc/testsuite/gcc.target/i386/pr120427-4.c
*** gcc-13-20250724/gcc/testsuite/gcc.target/i386/pr120427-4.c	Thu Jan  1 00:00:00 1970
--- gcc-13-20250731/gcc/testsuite/gcc.target/i386/pr120427-4.c	Thu Jul 31 22:33:18 2025
***************
*** 0 ****
--- 1,6 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O2" } */
+ 
+ #include "cold-attribute-4.c"
+ 
+ /* { dg-final { scan-assembler "movl" } } */
diff -Nrcpad gcc-13-20250724/gcc/testsuite/gcc.target/i386/pr120427-5.c gcc-13-20250731/gcc/testsuite/gcc.target/i386/pr120427-5.c
*** gcc-13-20250724/gcc/testsuite/gcc.target/i386/pr120427-5.c	Thu Jan  1 00:00:00 1970
--- gcc-13-20250731/gcc/testsuite/gcc.target/i386/pr120427-5.c	Thu Jul 31 22:33:18 2025
***************
*** 0 ****
--- 1,10 ----
+ /* { dg-do compile { target { ! ia32 } } } */
+ /* { dg-options "-Oz" } */
+ 
+ long long
+ func1 (void)
+ {
+   return -1;
+ }
+ /* { dg-final { scan-assembler-times "pushq\[ \\t\]+\\\$-1" 1 } } */
+ /* { dg-final { scan-assembler-times "popq\[ \\t\]+%rax" 1 } } */
diff -Nrcpad gcc-13-20250724/gcc/testsuite/gcc.target/powerpc/vsx-builtin-7.c gcc-13-20250731/gcc/testsuite/gcc.target/powerpc/vsx-builtin-7.c
*** gcc-13-20250724/gcc/testsuite/gcc.target/powerpc/vsx-builtin-7.c	Thu Jul 24 22:32:29 2025
--- gcc-13-20250731/gcc/testsuite/gcc.target/powerpc/vsx-builtin-7.c	Thu Jul 31 22:33:18 2025
***************
*** 1,7 ****
  /* { dg-do compile { target { powerpc*-*-* } } } */
  /* { dg-skip-if "" { powerpc*-*-darwin* } } */
  /* { dg-require-effective-target powerpc_vsx_ok } */
! /* { dg-options "-O2 -mdejagnu-cpu=power7 -fno-inline-functions" } */
  
  /* Test simple extract/insert/slat operations.  Make sure all types are
     supported with various options.  */
--- 1,15 ----
  /* { dg-do compile { target { powerpc*-*-* } } } */
  /* { dg-skip-if "" { powerpc*-*-darwin* } } */
  /* { dg-require-effective-target powerpc_vsx_ok } */
! /* { dg-options "-O2 -mdejagnu-cpu=power7 -fno-inline-functions -fno-ipa-icf" } */
! 
! /* PR testsuite/119382
!    Note: Added -fno-ipa-icf to disable Interprocedural Identical Code
!    Folding (ICF). Without this, insert_di_0_v2 is merged with insert_di_0
!    due to improved alias analysis introduced in commit r15-7961-gdc47161c1f32c3.
!    This results in the compiler replacing insert_di_0_v2 with a tail call to
!    insert_di_0, altering expected test behavior. Disabling ICF ensures correct
!    execution of the test.  */
  
  /* Test simple extract/insert/slat operations.  Make sure all types are
     supported with various options.  */
diff -Nrcpad gcc-13-20250724/libsanitizer/sanitizer_common/sanitizer_common_interceptors_ioctl.inc gcc-13-20250731/libsanitizer/sanitizer_common/sanitizer_common_interceptors_ioctl.inc
*** gcc-13-20250724/libsanitizer/sanitizer_common/sanitizer_common_interceptors_ioctl.inc	Thu Jul 24 22:33:04 2025
--- gcc-13-20250731/libsanitizer/sanitizer_common/sanitizer_common_interceptors_ioctl.inc	Thu Jul 31 22:33:52 2025
*************** static void ioctl_table_fill() {
*** 338,354 ****
    _(SOUND_PCM_WRITE_CHANNELS, WRITE, sizeof(int));
    _(SOUND_PCM_WRITE_FILTER, WRITE, sizeof(int));
    _(TCFLSH, NONE, 0);
- #if SANITIZER_GLIBC
-   _(TCGETA, WRITE, struct_termio_sz);
- #endif
    _(TCGETS, WRITE, struct_termios_sz);
    _(TCSBRK, NONE, 0);
    _(TCSBRKP, NONE, 0);
- #if SANITIZER_GLIBC
-   _(TCSETA, READ, struct_termio_sz);
-   _(TCSETAF, READ, struct_termio_sz);
-   _(TCSETAW, READ, struct_termio_sz);
- #endif
    _(TCSETS, READ, struct_termios_sz);
    _(TCSETSF, READ, struct_termios_sz);
    _(TCSETSW, READ, struct_termios_sz);
--- 338,346 ----
diff -Nrcpad gcc-13-20250724/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp gcc-13-20250731/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp
*** gcc-13-20250724/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp	Thu Jul 24 22:33:04 2025
--- gcc-13-20250731/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp	Thu Jul 31 22:33:52 2025
*************** unsigned struct_ElfW_Phdr_sz = sizeof(El
*** 467,475 ****
    unsigned struct_input_id_sz = sizeof(struct input_id);
    unsigned struct_mtpos_sz = sizeof(struct mtpos);
    unsigned struct_rtentry_sz = sizeof(struct rtentry);
- #if SANITIZER_GLIBC || SANITIZER_ANDROID
-   unsigned struct_termio_sz = sizeof(struct termio);
- #endif
    unsigned struct_vt_consize_sz = sizeof(struct vt_consize);
    unsigned struct_vt_sizes_sz = sizeof(struct vt_sizes);
    unsigned struct_vt_stat_sz = sizeof(struct vt_stat);
--- 467,472 ----
*************** unsigned struct_ElfW_Phdr_sz = sizeof(El
*** 746,758 ****
    unsigned IOCTL_SOUND_PCM_WRITE_FILTER = SOUND_PCM_WRITE_FILTER;
  #endif // SOUND_VERSION
    unsigned IOCTL_TCFLSH = TCFLSH;
-   unsigned IOCTL_TCGETA = TCGETA;
    unsigned IOCTL_TCGETS = TCGETS;
    unsigned IOCTL_TCSBRK = TCSBRK;
    unsigned IOCTL_TCSBRKP = TCSBRKP;
-   unsigned IOCTL_TCSETA = TCSETA;
-   unsigned IOCTL_TCSETAF = TCSETAF;
-   unsigned IOCTL_TCSETAW = TCSETAW;
    unsigned IOCTL_TCSETS = TCSETS;
    unsigned IOCTL_TCSETSF = TCSETSF;
    unsigned IOCTL_TCSETSW = TCSETSW;
--- 743,751 ----
diff -Nrcpad gcc-13-20250724/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h gcc-13-20250731/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
*** gcc-13-20250724/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h	Thu Jul 24 22:33:04 2025
--- gcc-13-20250731/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h	Thu Jul 31 22:33:52 2025
*************** extern unsigned struct_hd_geometry_sz;
*** 998,1004 ****
  extern unsigned struct_input_absinfo_sz;
  extern unsigned struct_input_id_sz;
  extern unsigned struct_mtpos_sz;
- extern unsigned struct_termio_sz;
  extern unsigned struct_vt_consize_sz;
  extern unsigned struct_vt_sizes_sz;
  extern unsigned struct_vt_stat_sz;
--- 998,1003 ----
*************** extern unsigned IOCTL_SNDCTL_COPR_SENDMS
*** 1243,1255 ****
  extern unsigned IOCTL_SNDCTL_COPR_WCODE;
  extern unsigned IOCTL_SNDCTL_COPR_WDATA;
  extern unsigned IOCTL_TCFLSH;
- extern unsigned IOCTL_TCGETA;
  extern unsigned IOCTL_TCGETS;
  extern unsigned IOCTL_TCSBRK;
  extern unsigned IOCTL_TCSBRKP;
- extern unsigned IOCTL_TCSETA;
- extern unsigned IOCTL_TCSETAF;
- extern unsigned IOCTL_TCSETAW;
  extern unsigned IOCTL_TCSETS;
  extern unsigned IOCTL_TCSETSF;
  extern unsigned IOCTL_TCSETSW;
--- 1242,1250 ----
