[all-commits] [llvm/llvm-project] 3c696a: [AArch64][SVE] Allow lax conversion between VLATs ...

Joe Ellis via All-commits all-commits at lists.llvm.org
Mon Nov 23 02:47:48 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 3c696a212ba4328e4f8f92136bc4d728a6490ef7
      https://github.com/llvm/llvm-project/commit/3c696a212ba4328e4f8f92136bc4d728a6490ef7
  Author: Joe Ellis <joe.ellis at arm.com>
  Date:   2020-11-23 (Mon, 23 Nov 2020)

  Changed paths:
    M clang/lib/AST/ASTContext.cpp
    M clang/test/Sema/aarch64-sve-lax-vector-conversions.c
    M clang/test/Sema/attr-arm-sve-vector-bits.c
    M clang/test/SemaCXX/aarch64-sve-lax-vector-conversions.cpp

  Log Message:
  -----------
  [AArch64][SVE] Allow lax conversion between VLATs and GNU vectors

Previously, lax conversions were only allowed between SVE vector-length
agnostic types and vector-length specific types. This meant that code
such as the following:

    #include <arm_sve.h>
    #define N __ARM_FEATURE_SVE_BITS
    #define FIXED_ATTR __attribute__ ((vector_size (N/8)))
    typedef float fixed_float32_t FIXED_ATTR;

    void foo() {
        fixed_float32_t fs32;
        svfloat64_t s64;
        fs32 = s64;
    }

was not allowed.

This patch makes a minor change to areLaxCompatibleSveTypes to allow for
lax conversions to be performed between SVE vector-length agnostic types
and GNU vectors.

Differential Revision: https://reviews.llvm.org/D91696




More information about the All-commits mailing list