Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
  • This project
    • Loading...
  • Sign in / Register
R
riscv-gcc-1
  • Overview
    • Overview
    • Details
    • Activity
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 0
    • Issues 0
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • lvzhengyang
  • riscv-gcc-1
  • Repository

Switch branch/tag
  • riscv-gcc-1
  • gcc
  • config
  • arm
  • arm.c
Find file
BlameHistoryPermalink
  • Richard Sandiford's avatar
    c++: Treat GNU and Advanced SIMD vectors as distinct [PR95726] · 932e9140
    This is a release branch version of
    r11-1741-g:31427b974ed7b7dd54e28fec595e731bf6eea8ba and
    r11-2022-g:efe99cca78215e339ba79f0a900a896b4c0a3d36.
    
    The trunk versions of the patch made GNU and Advanced SIMD vectors
    distinct (but inter-convertible) in all cases.  However, the
    traditional behaviour is that the types are distinct in template
    arguments but not otherwise.
    
    Following a suggestion from Jason, this patch puts the check
    for different vector types under comparing_specializations.
    In order to keep the backport as simple as possible, the patch
    hard-codes the name of the attribute in the frontend rather than
    adding a new branch-only target hook.
    
    I didn't find a test that tripped the assert on the branch,
    even with the --param in the PR, so instead I tested this by
    forcing the hash function to only hash the tree code.  That made
    the static assertion in the test fail without the patch but pass
    with it.
    
    This means that the tests pass for unmodified sources even
    without the patch (unless you're very unlucky).
    
    gcc/
    	PR target/95726
    	* config/aarch64/aarch64.c (aarch64_attribute_table): Add
    	"Advanced SIMD type".
    	* config/aarch64/aarch64-builtins.c: Include stringpool.h and
    	attribs.h.
    	(aarch64_init_simd_builtin_types): Add an "Advanced SIMD type"
    	attribute to each Advanced SIMD type.
    	* config/arm/arm.c (arm_attribute_table): Add "Advanced SIMD type".
    	* config/arm/arm-builtins.c: Include stringpool.h and attribs.h.
    	(arm_init_simd_builtin_types): Add an "Advanced SIMD type"
    	attribute to each Advanced SIMD type.
    
    gcc/cp/
    	PR target/95726
    	* typeck.c (structural_comptypes): When comparing template
    	specializations, differentiate between vectors that have and
    	do not have an "Advanced SIMD type" attribute.
    
    gcc/testsuite/
    	PR target/95726
    	* g++.target/aarch64/pr95726.C: New test.
    	* g++.target/arm/pr95726.C: Likewise.
    Richard Sandiford committed Jul 15, 2020
    932e9140
arm.c 974 KB
Edit