Skip to content
Snippets Groups Projects
  1. Jan 15, 2025
  2. Jan 13, 2025
    • rdubner's avatar
      8a9c83c0
    • rdubner's avatar
    • Xi Ruoyao's avatar
      RISC-V: Improve bitwise and ashift reassociation for single-bit immediate without zbs [PR 115921] · 107d5d68
      Xi Ruoyao authored
      When zbs is not available, there's nothing special with single-bit
      immediates and we should perform reassociation as normal immediates.
      
      gcc/ChangeLog:
      
      	PR target/115921
      	* config/riscv/riscv.md (<optab>_shift_reverse): Only check
      	popcount_hwi if !TARGET_ZBS.
      107d5d68
    • Jin Ma's avatar
      RISC-V: Fix the result error caused by not updating ratio when using "use_max_sew" to merge vsetvl · 8d577a01
      Jin Ma authored
      When the vsetvl instructions of the two RVV instructions are merged
      using "use_max_sew", it is possible to update the sew of prev if
      prev.sew < next.sew, but keep the original ratio, which is obviously
      wrong. when the subsequent instructions are equal to the wrong ratio,
      it is possible to generate the wrong "vsetvli zero,zero" instruction,
      which will lead to unknown avl.
      
      gcc/ChangeLog:
      
      	* config/riscv/riscv-vsetvl.cc (demand_system::use_max_sew): Also
      	set the ratio for PREV.
      
      gcc/testsuite/ChangeLog:
      
      	* gcc.target/riscv/rvv/base/bug-10.c: New test.
      8d577a01
    • Vineet Gupta's avatar
      RISC-V: fix thinko in riscv_register_move_cost () · 71026200
      Vineet Gupta authored
      
      This seeming benign mistake caused a massive SPEC2017 Cactu regression
      (2.1 trillion insn to 2.5 trillion) wiping out all the gains from my
      recent sched1 improvement. Thankfully the issue was trivial to fix even
      if hard to isolate.
      
      On BPI3:
      
      Before bug
      ----------
      |  Performance counter stats for './cactusBSSN_r_base-1':
      |
      |       4,557,471.02 msec task-clock:u                     #    1.000 CPUs utilized
      |              1,245      context-switches:u               #    0.273 /sec
      |                  1      cpu-migrations:u                 #    0.000 /sec
      |            205,376      page-faults:u                    #   45.064 /sec
      |  7,291,944,801,307      cycles:u                         #    1.600 GHz
      |  2,134,835,735,951      instructions:u                   #    0.29  insn per cycle
      |     10,799,296,738      branches:u                       #    2.370 M/sec
      |         15,308,966      branch-misses:u                  #    0.14% of all branches
      |
      |     4557.710508078 seconds time elapsed
      
      Bug
      ---
      |  Performance counter stats for './cactusBSSN_r_base-2':
      |
      |       4,801,813.79 msec task-clock:u                     #    1.000 CPUs utilized
      |              8,066      context-switches:u               #    1.680 /sec
      |                  1      cpu-migrations:u                 #    0.000 /sec
      |            203,836      page-faults:u                    #   42.450 /sec
      |  7,682,826,638,790      cycles:u                         #    1.600 GHz
      |  2,503,133,291,344      instructions:u                   #    0.33  insn per cycle
         ^^^^^^^^^^^^^^^^^
      |     10,799,287,796      branches:u                       #    2.249 M/sec
      |         16,641,200      branch-misses:u                  #    0.15% of all branches
      |
      |     4802.616638386 seconds time elapsed
      |
      
      Fix
      ---
      |  Performance counter stats for './cactusBSSN_r_base-3':
      |
      |       4,556,170.75 msec task-clock:u                     #    1.000 CPUs utilized
      |              1,739      context-switches:u               #    0.382 /sec
      |                  0      cpu-migrations:u                 #    0.000 /sec
      |            203,458      page-faults:u                    #   44.655 /sec
      |  7,289,854,613,923      cycles:u                         #    1.600 GHz
      |  2,134,854,070,916      instructions:u                   #    0.29  insn per cycle
      |     10,799,296,807      branches:u                       #    2.370 M/sec
      |         15,403,357      branch-misses:u                  #    0.14% of all branches
      |
      |     4556.445490123 seconds time elapsed
      
      Fixes: 46888571 ("RISC-V: Add cr and cf constraint")
      Signed-off-by: default avatarVineet Gupta <vineetg@rivosinc.com>
      
      gcc/ChangeLog:
      	* config/riscv/riscv.cc (riscv_register_move_cost): Remove buggy
      	check.
      71026200
    • Paul-Antoine Arras's avatar
      Accept commas between clauses in OpenMP declare variant · 2ea4801c
      Paul-Antoine Arras authored
      Add support to the Fortran parser for the OpenMP syntax that allows a comma
      after the directive name and between clauses of declare variant. The C and C++
      parsers already support this syntax so only a new test is added.
      
      gcc/fortran/ChangeLog:
      
      	* openmp.cc (gfc_match_omp_declare_variant): Match comma after directive
      	name and between clauses. Emit more useful diagnostics.
      
      gcc/testsuite/ChangeLog:
      
      	* gfortran.dg/gomp/declare-variant-2.f90: Remove error test for a comma
      	after the directive name. Add tests for other invalid syntaxes (extra
      	comma and invalid clause).
      	* c-c++-common/gomp/adjust-args-5.c: New test.
      	* gfortran.dg/gomp/adjust-args-11.f90: New test.
      2ea4801c
    • rdubner's avatar
      0cc8bd9a
    • Jin Ma's avatar
      RISC-V: Fix program logic errors caused by data truncation on 32-bit host for zbs, such as i386 · ecf688ed
      Jin Ma authored
      Correct logic on 64-bit host:
              ...
              bseti   a5,zero,38
              bseti   a5,a5,63
              addi    a5,a5,-1
              and     a4,a4,a5
      	...
      
      Wrong logic on 32-bit host:
      	...
              li      a5,64
              bseti   a5,a5,31
              addi    a5,a5,-1
              and     a4,a4,a5
      	...
      
      gcc/ChangeLog:
      
      	* config/riscv/riscv.cc (riscv_build_integer_1): Change
      	1UL/1ULL to HOST_WIDE_INT_1U.
      
      gcc/testsuite/ChangeLog:
      
      	* gcc.target/riscv/zbs-bug.c: New test.
      ecf688ed
    • Paul-Antoine Arras's avatar
      Add missing target directive in OpenMP dispatch Fortran runtime test · 655a8a02
      Paul-Antoine Arras authored
      Without the target directive, the test would run on the host but still try to
      use device pointers, which causes a segfault.
      
      libgomp/ChangeLog:
      
      	* testsuite/libgomp.fortran/dispatch-1.f90: Add missing target
      	directive.
      655a8a02
    • Gaius Mulley's avatar
      PR modula2/118453: Subranges types do not use virtual tokens during construction · 7cd4de65
      Gaius Mulley authored
      
      P2SymBuild.mod.BuildSubrange does not use a virtual token and therefore
      any error message containing a subrange type produces poor location carots.
      This patch rewrites BuildSubrange and the buildError4 procedure in
      M2Check.mod (which is only called when there is a formal/actual parameter
      mismatch).  buildError4 now issues a sub error for the formal and actual
      type declaration highlighing the type mismatch.
      
      gcc/m2/ChangeLog:
      
      	PR modula2/118453
      	* gm2-compiler/M2Check.mod (buildError4): Call MetaError1
      	for the actual and formal parameter type.
      	* gm2-compiler/P2Build.bnf (SubrangeType): Construct a virtual
      	token containing the subrange type declaration.
      	(PrefixedSubrangeType): Ditto.
      	* gm2-compiler/P2SymBuild.def (BuildSubrange): Add tok parameter.
      	* gm2-compiler/P2SymBuild.mod (BuildSubrange): Use tok parameter,
      	rather than the token at the start of the subrange.
      
      gcc/testsuite/ChangeLog:
      
      	PR modula2/118453
      	* gm2/pim/fail/badbecomes2.mod: New test.
      	* gm2/pim/fail/badparamset1.mod: New test.
      	* gm2/pim/fail/badparamset2.mod: New test.
      	* gm2/pim/fail/badsyntaxset1.mod: New test.
      
      Signed-off-by: default avatarGaius Mulley <gaiusmod2@gmail.com>
      7cd4de65
    • Jeff Law's avatar
      [PR rtl-optimization/107455] Eliminate unnecessary constant load · d23d338d
      Jeff Law authored
      This resurrects a patch from a bit over 2 years ago that I never wrapped up.
      IIRC, I ended up up catching covid, then in the hospital for an unrelated issue
      and it just got dropped on the floor in the insanity.
      
      The basic idea here is to help postreload-cse eliminate more const/copies by
      recording a small set of conditional equivalences (as Richi said in 2022,
      "Ick").
      
      It was originally to help eliminate an unnecessary constant load I saw in
      coremark, but as seen in BZ107455 the same issues show up in real code as well.
      
      Bootstrapped and regression tested on x86-64, also been through multiple spins
      in my tester.
      
      Changes since v2:
      
        - Simplified logic for blocks to examine
        - Remove redundant tests when filtering blocks to examine
        - Remove bogus check which only allowed reg->reg copies
      
      Changes since v1:
      
      Richard B and Richard S both had good comments last time around and their
      requests are reflected in this update:
      
        - Use rtx_equal_p rather than pointer equality
        - Restrict to register "destinations"
        - Restrict to integer modes
        - Adjust entry block handling
      
      My own wider scale testing resulted in a few more changes.
      
        - Robustify extracting the (set (pc) ... ), which then required ...
        - Handle if src/dst are clobbered by the conditional branch
        - Fix logic error causing too many equivalences to be recorded
      
      	PR rtl-optimization/107455
      gcc/
      	* postreload.cc (reload_cse_regs_1): Take advantage of conditional
      	equivalences.
      
      gcc/testsuite
      	* gcc.target/riscv/pr107455-1.c: New test.
      	* gcc.target/riscv/pr107455-2.c: New test.
      d23d338d
    • Alexandre Oliva's avatar
      [ifcombine] propagate signbit mask to XOR right-hand operand · 52e4ede0
      Alexandre Oliva authored
      If a single-bit bitfield takes up the sign bit of a storage unit,
      comparing the corresponding bitfield between two objects loads the
      storage units, XORs them, converts the result to signed char, and
      compares it with zero: ((signed char)(a.<byte> ^ c.<byte>) >= 0).
      
      fold_truth_andor_for_ifcombine recognizes the compare with zero as a
      sign bit test, then it decomposes the XOR into an equality test.
      
      The problem is that, after this decomposition, that figures out the
      width of the accessed fields, we apply the sign bit mask to the
      left-hand operand of the compare, but we failed to also apply it to
      the right-hand operand when both were taken from the same XOR.
      
      This patch fixes that.
      
      
      for  gcc/ChangeLog
      
      	PR tree-optimization/118409
      	* gimple-fold.cc (fold_truth_andor_for_ifcombine): Apply the
      	signbit mask to the right-hand XOR operand too.
      
      for  gcc/testsuite/ChangeLog
      
      	PR tree-optimization/118409
      	* gcc.dg/field-merge-20.c: New.
      52e4ede0
    • Jakub Jelinek's avatar
      expr: Fix up the divmod cost debugging note [PR115910] · 41a5a97d
      Jakub Jelinek authored
      Something I've noticed during working on the crc wrong-code fix.
      My first version of the patch failed because of no longer matching some
      expected strings in the assembly, so I had to add TDF_DETAILS debugging
      into the -fdump-rtl-expand-details dump which the crc tests can use.
      
      For PR115910 Andrew has added similar note for the division/modulo case
      if it is positive and we can choose either unsigned or signed
      division.  The problem is that unlike most other TDF_DETAILS diagnostics,
      this is not done before emitting the IL for the function, but during it.
      
      Other messages there are prefixed with ;;, both details on what it is doing
      and the GIMPLE IL for which it expands RTL, so the
      ;; Generating RTL for gimple basic block 4
      
      ;;
      
      (code_label 13 12 14 2 (nil) [0 uses])
      
      (note 14 13 0 NOTE_INSN_BASIC_BLOCK)
      positive division: unsigned cost: 30; signed cost: 28
      
      ;; return _4;
      
      message in between just looks weird and IMHO should be ;; prefixed.
      
      2025-01-13  Jakub Jelinek  <jakub@redhat.com>
      
      	PR target/115910
      	* expr.cc (expand_expr_divmod): Prefix the TDF_DETAILS note with
      	";; " and add a space before (needed tie breaker).  Formatting fixes.
      41a5a97d
    • Martin Jambor's avatar
      MAINTAINERS: Make contrib/check-MAINTAINERS.py happy · 539fc490
      Martin Jambor authored
      This commit makes the contrib/check-MAINTAINERS.py script happy about
      our MAINTAINERS file.  I hope that it knows best how things ought to
      be and so am committing this as obvious.
      
      ChangeLog:
      
      2025-01-13  Martin Jambor  <mjambor@suse.cz>
      
      	* MAINTAINERS: Fix the name order of the Write After Approval section.
      Unverified
      539fc490
    • Pascal Obry's avatar
      ada: Update gnatdll documentation (-b option removed) · 0cf06bf0
      Pascal Obry authored
      gcc/ada/ChangeLog:
      	* doc/gnat_ugn/platform_specific_information.rst: Update.
      	* gnat_ugn.texi: Regenerate.
      0cf06bf0
    • Javier Miranda's avatar
      ada: Cleanup preanalysis of static expressions (part 5) · 1a826571
      Javier Miranda authored
      Partially revert the fix for sem_ch13.adb as it does not comply
      with RM 13.14(7.2/5).
      
      gcc/ada/ChangeLog:
      
      	* sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Restore calls
      	to Preanalyze_Spec_Expression that were replaced by calls to
      	Preanalyze_And_Resolve. Add documentation.
      	(Check_Aspect_At_Freeze_Point): Ditto.
      1a826571
    • Pascal Obry's avatar
      ada: Fix relocatable DLL creation with gnatdll · 2e0b086f
      Pascal Obry authored
      gcc/ada/ChangeLog:
      
      	* mdll.adb: For the created DLL to be relocatable we do not want to use
      	the base file name when calling gnatdll.
      	* gnatdll.adb: Removes option -d which is not working anymore. And
      	when using a truly relocatable DLL the base-address has no real
      	meaning. Also reword the usage string for -d as we do not want to
      	specify relocatable as gnatdll can be used to create both
      	relocatable and non relocatable DLL.
      2e0b086f
    • Piotr Trojanek's avatar
      ada: Remove redundant parentheses inside unary operators (cont.) · 492aae16
      Piotr Trojanek authored
      GNAT already emits a style warning when redundant parentheses appear inside
      logical and short-circuit operators. A similar warning will be soon emitted for
      unary operators as well. This patch removes the redundant parentheses to avoid
      build errors.
      
      gcc/ada/ChangeLog:
      
      	* libgnat/a-strunb.ads: Remove redundant parentheses inside NOT
      	operators.
      492aae16
    • Javier Miranda's avatar
      ada: Cleanup preanalysis of static expressions (part 4) · 5fd925bf
      Javier Miranda authored
      Fix regression in the SPARK 2014 testsuite.
      
      gcc/ada/ChangeLog:
      
      	* sem_util.adb (Build_Actual_Subtype_Of_Component): No action
      	under preanalysis.
      	* sem_ch5.adb (Set_Assignment_Type): If the right-hand side contains
      	target names, expansion has been disabled to prevent expansion that
      	might move target names out of the context of the assignment statement.
      	Restore temporarily the current compilation mode so that the actual
      	subtype can be built.
      5fd925bf
    • Piotr Trojanek's avatar
      ada: Warn about redundant parentheses inside unary operators · 686bd4e0
      Piotr Trojanek authored
      GNAT already emits a style warning when redundant parentheses appear inside
      logical and short-circuit operators. A similar warning is now emitted for
      unary operators as well.
      
      gcc/ada/ChangeLog:
      
      	* par-ch4.adb (P_Factor): Warn when the operand of a unary operator
      	doesn't require parentheses.
      686bd4e0
    • Piotr Trojanek's avatar
      ada: Remove redundant parentheses inside unary operators in comments · 34943af1
      Piotr Trojanek authored
      GNAT already emits a style warning when redundant parentheses appear inside
      logical and short-circuit operators. A similar warning will be soon emitted for
      unary operators as well. This patch removes the redundant parentheses to avoid
      future build errors.
      
      gcc/ada/ChangeLog:
      
      	* libgnat/s-genbig.adb: Remove redundant parentheses in comments.
      34943af1
    • Piotr Trojanek's avatar
      ada: Remove redundant parentheses inside unary operators · 94a7543d
      Piotr Trojanek authored
      GNAT already emits a style warning when redundant parentheses appear inside
      logical and short-circuit operators. A similar warning will be soon emitted for
      unary operators as well. This patch removes the redundant parentheses to avoid
      future build errors.
      
      gcc/ada/ChangeLog:
      
      	* checks.adb, exp_dist.adb, exp_imgv.adb, exp_util.adb,
      	libgnarl/a-reatim.adb, libgnat/a-coinve.adb, libgnat/a-nbnbre.adb,
      	libgnat/a-ngcoty.adb, libgnat/a-ngelfu.adb, libgnat/a-ngrear.adb,
      	libgnat/a-strbou.ads, libgnat/a-strfix.ads, libgnat/a-strsea.adb,
      	libgnat/a-strsea.ads, libgnat/a-strsup.ads,
      	libgnat/a-strunb__shared.ads, libgnat/g-alleve.adb,
      	libgnat/g-spitbo.adb, libgnat/s-aridou.adb, libgnat/s-arit32.adb,
      	libgnat/s-dourea.ads, libgnat/s-genbig.adb, libgnat/s-imager.adb,
      	libgnat/s-statxd.adb, libgnat/s-widthi.adb, sem_attr.adb, sem_ch10.adb,
      	sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_dim.adb, sem_prag.adb,
      	sem_res.adb, uintp.adb: Remove redundant parentheses inside NOT and ABS
      	operators.
      94a7543d
    • Piotr Trojanek's avatar
      ada: Fix spurious warning about redundant parentheses in range bound · ef4448e0
      Piotr Trojanek authored
      Use the same logic for warning about redundant parentheses in lower and upper
      bounds of a discrete range. This fixes a spurious warning that, if followed,
      would render the code illegal.
      
      gcc/ada/ChangeLog:
      
      	* par-ch3.adb (P_Discrete_Range): Detect redundant parentheses in the
      	lower bound like in the upper bound.
      ef4448e0
    • Gary Dismukes's avatar
      ada: Unbounded recursion on character aggregates with predicated component subtype · c6989fbb
      Gary Dismukes authored
      The compiler was recursing endlessly when analyzing an aggregate of
      an array type whose component subtype has a static predicate and the
      component expressions are static, repeatedly transforming the aggregate
      first into a string literal and then back into an aggregate. This is fixed
      by suppressing the transformation to a string literal in the case where
      the component subtype has predicates.
      
      gcc/ada/ChangeLog:
      
      	* sem_aggr.adb (Resolve_Aggregate): Add another condition to prevent rewriting
      	an aggregate whose type is an array of characters, testing for the presence of
      	predicates on the component type.
      c6989fbb
    • Piotr Trojanek's avatar
      ada: Simplify expansion of negative membership operator · f9d22b7a
      Piotr Trojanek authored
      Code cleanup; semantics is unaffected.
      
      gcc/ada/ChangeLog:
      
      	* exp_ch4.adb: (Expand_N_Not_In): Preserve Alternatives in expanded
      	membership operator just like preserving Right_Opnd (though only
      	one of these fields is present at a time).
      	* par-ch4.adb (P_Membership_Test): Remove redundant setting of fields
      	to their default values.
      f9d22b7a
    • Piotr Trojanek's avatar
      ada: Warn about redundant parentheses in upper range bounds · 518fd9e9
      Piotr Trojanek authored
      Fix a glitch in condition that effectively caused detection of redundant
      parentheses in upper range bounds to be dead code.
      
      gcc/ada/ChangeLog:
      
      	* par-ch3.adb (P_Discrete_Range): Replace N_Subexpr, which was catching
      	all subexpressions, with kinds that catch nodes that require
      	parentheses to become "simple expressions".
      518fd9e9
    • Eric Botcazou's avatar
      ada: Add more commentary to System.Val_Real.Large_Powfive · d2e3635a
      Eric Botcazou authored
      gcc/ada/ChangeLog:
      
      	* libgnat/s-valrea.adb (Large_Powfive) [2 parameters]: Add a couple
      	of additional comments.
      d2e3635a
    • Piotr Trojanek's avatar
      ada: Fix parsing of raise expressions with no parens · 26b649b2
      Piotr Trojanek authored
      According to Ada grammar, raise expression is an expression, but requires
      parens to be a simple_expression. We wrongly classified raise expressions
      as expressions, because we mishandled a global state variable in the parser.
      
      This patch causes some illegal code to be rejected.
      
      gcc/ada/ChangeLog:
      
      	* par-ch4.adb (P_Relation): Prevent Expr_Form to be overwritten when
      	parsing the raise expression itself.
      	(P_Simple_Expression): Fix manipulation of Expr_Form.
      26b649b2
    • Richard Biener's avatar
      tree-optimization/117119 - ICE with int128 IV in dataref analysis · d3904a3a
      Richard Biener authored
      
      Here's another fix for a missing check that an IV value fits in a
      HIW.  It's originally from Stefan.
      
      	PR tree-optimization/117119
      	* tree-data-ref.cc (initialize_matrix_A): Check whether
      	an INTEGER_CST fits in HWI, otherwise return chrec_dont_know.
      
      	* gcc.dg/torture/pr117119.c: New testcase.
      
      Co-Authored-By: default avatarStefan Schulze Frielinghaus <stefansf@linux.ibm.com>
      d3904a3a
    • Thomas Schwinge's avatar
      Un-XFAIL 'dg-note's in 'gfortran.dg/goacc/routine-external-level-of-parallelism-2.f' · c0c47fc8
      Thomas Schwinge authored
      As of the recent commit 65286465
      "Fortran: Fix location_t in gfc_get_extern_function_decl; [...]" change:
      
          The declaration created by gfc_get_extern_function_decl used input_location
          as DECL_SOURCE_LOCATION, which gave rather odd results with 'declared here'
          diagnostic. - It is much more useful to use the gfc_symbol's declated_at,
          which this commit now does.
      
      ..., we're no longer using the 'dg-bogus' location informations, as pointed out
      for one class of additional notes of
      'gfortran.dg/goacc/routine-external-level-of-parallelism-2.f', once added in
      commit 03eb7791 "Add 'dg-note', 'dg-lto-note'".
      Therefore, un-XFAILed 'dg-note's rather than XFAILed 'dg-bogus'es.
      
      	gcc/testsuite/
      	* gfortran.dg/goacc/routine-external-level-of-parallelism-2.f:
      	Un-XFAIL 'dg-note's.
      c0c47fc8
    • Richard Biener's avatar
      Bump BASE-VER to 14.0.1 now that we are in stage4. · 017c45fa
      Richard Biener authored
      	* BASE-VER: Bump to 14.0.1.
      017c45fa
    • Michal Jires's avatar
      lto: Pass cache checksum by reference [PR118181] · 9100be57
      Michal Jires authored
      Bootstrapped/regtested on x86_64-linux. Committed as obvious.
      
      	PR lto/118181
      
      gcc/ChangeLog:
      
      	* lto-ltrans-cache.cc (ltrans_file_cache::create_item):
      	Pass checksum by reference.
      	* lto-ltrans-cache.h: Likewise.
      9100be57
    • Michal Jires's avatar
      lto: Fix empty fnctl.h build error with MinGW. · 89ebb88d
      Michal Jires authored
      MSYS2+MinGW contains headers without defining expected contents.
      This fix checks that the fcntl function is actually defined.
      
      Bootstrapped/regtested on x86_64-linux. Committed as obvious.
      
      gcc/ChangeLog:
      
      	* lockfile.cc (LOCKFILE_USE_FCNTL): New.
      	(lockfile::lock_write): Use LOCKFILE_USE_FCNTL.
      	(lockfile::try_lock_write): Use LOCKFILE_USE_FCNTL.
      	(lockfile::lock_read): Use LOCKFILE_USE_FCNTL.
      	(lockfile::unlock): Use LOCKFILE_USE_FCNTL.
      	(lockfile::lockfile_supported): Use LOCKFILE_USE_FCNTL.
      89ebb88d
    • liuhongt's avatar
      Refactor ix86_expand_vecop_qihi2. · 0e05b793
      liuhongt authored
      Since there's regression to use vpermq, and it's manually disabled by
      !TARGET_AVX512BW. I remove the codes related to vpermq and make
      ix86_expand_vecop_qihi2 only handle vpmovbw + op + vpmovwb case.
      
      gcc/ChangeLog:
      
      	* config/i386/i386-expand.cc (ix86_expand_vecop_qihi2):
      	Refactor to avoid redundant TARGET_AVX512BW in many places.
      0e05b793
    • Jakub Jelinek's avatar
      [PATCH] crc: Fix up some crc related wrong code issues [PR117997, PR118415] · 9c387a99
      Jakub Jelinek authored
      Hi!
      
      As mentioned in the second PR, using table names like
      crc_table_for_crc_8_polynomial_0x12
      in the user namespace is wrong, user could have defined such variables
      in their code and as can be seen on the last testcase, then it just
      misbehaves.
      At minimum such names should start with 2 underscores, moving it into
      implementation namespace, and if possible have some dot or dollar in the
      name if target supports it.
      I think assemble_crc_table right now always emits tables a local variables,
      I really don't see what would be setting TREE_PUBLIC flag on
      IDENTIFIER_NODEs.
      It might be nice to share the tables between TUs in the same binary or
      shared library, but it in that case should have hidden visibility if
      possible, so that it isn't exported from the libraries or binaries, we don't
      want the optimization to affect set of exported symbols from libraries.
      And, as can be seen in the first PR, building gen_rtx_SYMBOL_REF by hand
      is certainly unexpected on some targets, e.g. those which use
      -fsection-anchors, so we should instead use DECL_RTL of the VAR_DECL.
      For that we'd need to look it up if we haven't emitted it already, while
      IDENTIFIER_NODEs can be looked up easily, I guess for the VAR_DECLs we'd
      need custom hash table.
      
      Now, all of the above (except sharing between multiple TUs) is already
      implemented in output_constant_def, so I think it is much better to just
      use that function.
      
      And, if we want to share it between multiple TUs, we could extend the
      SHF_MERGE usage in gcc, currently we only use it for constant pool
      entries with same size as alignment, from 1 to 32 bytes, using .rodata.cstN
      sections.  We could just use say .rodata.cstM.N sections where M would be
      alignment and N would be the entity size.  We could use that for all
      constant pool entries say up to 2048 bytes.
      Though, as the current code doesn't share between multiple TUs, I think it
      can be done incrementally (either still for GCC 15, or GCC 16+).
      
      Bootstrapped/regtested on {x86_64,i686,aarch64,powerpc64le,s390x}-linux, on
      aarch64 it also fixes
      -FAIL: crypto/rsa
      -FAIL: hash
      ok for trunk?
      
      gcc/
      	PR tree-optimization/117997
      	PR middle-end/118415
      	* expr.cc (assemble_crc_table): Make static, remove id argument,
      	use output_constant_def.  Emit note if -fdump-rtl-expand-details
      	about which table has been emitted.
      	(generate_crc_table): Make static, adjust assemble_crc_table
      	caller, call it always.
      	(calculate_table_based_CRC): Make static.
      	* internal-fn.cc (expand_crc_optab_fn): Emit note if
      	-fdump-rtl-expand-details about using optab for crc.  Formatting fix.
      
      gcc/testsuite/
      	* gcc.dg/crc-builtin-target32.c: Add -fdump-rtl-expand-details
      	as dg-additional-options.  Scan expand dump rather than assembly,
      	adjust the regexps.
      	* gcc.dg/crc-builtin-target64.c: Likewise.
      	* gcc.dg/crc-builtin-rev-target32.c: Likewise.
      	* gcc.dg/crc-builtin-rev-target64.c: Likewise.
      	* gcc.dg/pr117997.c: New test.
      	* gcc.dg/pr118415.c: New test.
      9c387a99
    • GCC Administrator's avatar
      Daily bump. · 422c5884
      GCC Administrator authored
      422c5884
  3. Jan 12, 2025
    • Iain Buclaw's avatar
      d: Merge dmd, druntime c7902293d7, phobos 03aeafd20 · a2e540bf
      Iain Buclaw authored
      D front-end changes:
      
      	- Import dmd v2.110.0-rc.1.
      	- An error is now given for subtracting pointers of different
      	  types.
      
      D runtime changes:
      
      	- Import druntime v2.110.0-rc.1.
      
      Phobos changes:
      
      	- Import phobos v2.110.0-rc.1.
      
      gcc/d/ChangeLog:
      
      	* dmd/MERGE: Merge upstream dmd c7902293d7.
      	* dmd/VERSION: Bump version to v2.110.0-rc.1.
      
      libphobos/ChangeLog:
      
      	* libdruntime/MERGE: Merge upstream druntime c7902293d7.
      	* libdruntime/Makefile.am (DRUNTIME_DSOURCES): Rename
      	core/thread/fiber.d to core/thread/fiber/package.d.  Add
      	core/thread/fiber/base.d.
      	* libdruntime/Makefile.in: Regenerate.
      	* src/MERGE: Merge upstream phobos 63fdb282f.
      
      gcc/testsuite/ChangeLog:
      
      	* gdc.dg/asm3.d: Adjust test.
      	* gdc.dg/torture/pr96435.d: Adjust test.
      a2e540bf
    • Thomas Koenig's avatar
      Dump all symbol attributes in show_attr. · f4fa0b7d
      Thomas Koenig authored
      gcc/fortran/ChangeLog:
      
      	* dump-parse-tree.cc (show_attr): Dump all symbol attributes.
      f4fa0b7d
    • Iain Buclaw's avatar
      d: Merge upstream dmd, druntime c57da0cf59, phobos ad8ee5587 · 0dd21bce
      Iain Buclaw authored
      D front-end changes:
      
      	- Import latest fixes from dmd v2.110.0-beta.1.
      	- The `align' attribute now allows to specify `default'
      	  explicitly.
      	- Add primary expression of the form `__rvalue(expression)'
      	  which causes `expression' to be treated as an rvalue, even if
      	  it is an lvalue.
      	- Shortened method syntax can now be used in constructors.
      
      D runtime changes:
      
      	- Import latest fixes from druntime v2.110.0-beta.1.
      
      Phobos changes:
      
      	- Import latest fixes from phobos v2.110.0-beta.1.
      
      gcc/d/ChangeLog:
      
      	* dmd/MERGE: Merge upstream dmd c57da0cf59.
      	* d-codegen.cc (can_elide_copy_p): New.
      	(d_build_call): Use it.
      	* d-lang.cc (d_post_options): Update for new front-end interface.
      
      libphobos/ChangeLog:
      
      	* libdruntime/MERGE: Merge upstream druntime c57da0cf59.
      	* src/MERGE: Merge upstream phobos ad8ee5587.
      	* testsuite/libphobos.init_fini/custom_gc.d: Adjust test.
      
      gcc/testsuite/ChangeLog:
      
      	* gdc.dg/copy1.d: New test.
      0dd21bce
Loading