https://github.com/MacDue updated
https://github.com/llvm/llvm-project/pull/82689
>From 6bf8d649fb78b81adbaa7de82064161e14213fc4 Mon Sep 17 00:00:00 2001
From: AMS21
Date: Thu, 22 Feb 2024 22:10:09 +0100
Subject: [PATCH] [clang-tidy] Improve `google-explicit-constructor` checks
handling of `ex
@@ -1098,11 +1098,15 @@ LogicalResult
ModuleTranslation::convertOneFunction(LLVMFuncOp func) {
llvmFunc->addFnAttr("aarch64_pstate_sm_compatible");
if (func.getArmNewZa())
-llvmFunc->addFnAttr("aarch64_pstate_za_new");
- else if (func.getArmSharedZa())
-llvmFun
MacDue wrote:
> @c-rhodes the remaining failure is MLIR ::
> Conversion/TosaToTensor/tosa-to-tensor.mlir but it also fails without my
> changes.
Very likely unrelated we only added `interleave2` for use in ArmSME. It's not
used within high-level dialects like tosa & tensor.
https://github.c
https://github.com/MacDue created
https://github.com/llvm/llvm-project/pull/108575
There's currently no code path that can reach this crash, but:
```
Instruction *Inst = cast(Call.getScalarVal());
```
fails if the call returns `void`. This could happen if a builtin for something
like `void si
https://github.com/MacDue closed
https://github.com/llvm/llvm-project/pull/108575
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
MacDue wrote:
Thanks for letting me know, feel free to revert this change if it's a
non-trivial breakage.
https://github.com/llvm/llvm-project/pull/108575
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/
https://github.com/MacDue created
https://github.com/llvm/llvm-project/pull/108853
On some targets, an FP libcall with argument types such as long double
will be lowered to pass arguments indirectly via pointers. When this is
the case we should not mark the libcall with "int" TBAA as it may lead
MacDue wrote:
Note the first commit
(https://github.com/llvm/llvm-project/pull/108853/commits/6db9f6d56f0bbd56d017156f858eae68653fbd1b)
shows a correctness issue with what's currently upstream as the `load
x86_fp80` is incorrectly marked with "int" TBAA metadata (overwriting its
metadata for
MacDue wrote:
Thanks for the reduction! I tracked this down to the "int" TBAA metadata being
added to calls with indirect arguments (with seems broken even without this
change).
I've created a possible fix here:
https://github.com/llvm/llvm-project/pull/108853#event-14276322905.
https://gi
MacDue wrote:
> How does this interact with #107598?
I think it's solving the same problem, but a different way (looking at the
final LLVM function type rather than checking the ABI information).
https://github.com/llvm/llvm-project/pull/108853
___
c
MacDue wrote:
It looks like this crash is not unique to struct types, I can reproduce it with
array types too (which have been allowed for some time).
https://github.com/llvm/llvm-project/pull/110506
___
cfe-commits mailing list
cfe-commits@lists.llvm
MacDue wrote:
> Hi,
>
> I bisected a crash to this patch. I can't share the C reproducer but it's
> instcombine that crashes and a reduced reproducer for that is
> ```opt -passes=instcombine bbi-99792.ll -o /dev/null```
>
> [bbi-99792.ll.gz](https://github.com/user-attachments/files/17253640/b
https://github.com/MacDue created
https://github.com/llvm/llvm-project/pull/112580
These two veclibs are only available for AArch64 targets, and as mentioned in
https://discourse.llvm.org/t/rfc-should-fveclib-imply-fno-math-errno-for-all-targets/81384,
we (Arm) think that `-fveclib` should imp
https://github.com/MacDue updated
https://github.com/llvm/llvm-project/pull/112580
>From d8ac47d27ad860a8b11424621ab88cd9267cf866 Mon Sep 17 00:00:00 2001
From: Benjamin Maxwell
Date: Wed, 2 Oct 2024 10:28:29 +
Subject: [PATCH 1/6] [clang] Make -fveclib={ArmPL,SLEEF} imply -fno-math-errno
https://github.com/MacDue updated
https://github.com/llvm/llvm-project/pull/112580
>From e59c67a0fb40f1a0de96a626bf4f4fa9291436ec Mon Sep 17 00:00:00 2001
From: Benjamin Maxwell
Date: Wed, 2 Oct 2024 10:28:29 +
Subject: [PATCH 1/6] [clang] Make -fveclib={ArmPL,SLEEF} imply -fno-math-errno
@@ -502,6 +502,10 @@ def err_sls_hardening_arm_not_supported : Error<
def warn_drv_large_data_threshold_invalid_code_model: Warning<
"'%0' only applies to medium and large code models">,
InGroup;
+def warn_drv_math_errno_reenabled_after_veclib: Warning<
+ "math errno re-en
@@ -36,16 +36,23 @@
/* Verify that the correct vector library is passed to LTO flags. */
// RUN: %clang -### --target=x86_64-unknown-linux-gnu -fveclib=LIBMVEC -flto
%s 2>&1 | FileCheck --check-prefix=CHECK-LTO-LIBMVEC %s
+// CHECK-LTO-LIBMVEC: "-fmath-errno"
// CHECK-LTO-LI
https://github.com/MacDue updated
https://github.com/llvm/llvm-project/pull/112580
>From 9d378377a16798f4a866364a1c3f5d71b963cf15 Mon Sep 17 00:00:00 2001
From: Benjamin Maxwell
Date: Wed, 2 Oct 2024 10:28:29 +
Subject: [PATCH 1/6] [clang] Make -fveclib={ArmPL,SLEEF} imply -fno-math-errno
https://github.com/MacDue updated
https://github.com/llvm/llvm-project/pull/112580
>From 88352d935b1d0aca24a296c8e086d4e63cb98dd4 Mon Sep 17 00:00:00 2001
From: Benjamin Maxwell
Date: Wed, 2 Oct 2024 10:28:29 +
Subject: [PATCH 1/6] [clang] Make -fveclib={ArmPL,SLEEF} imply -fno-math-errno
https://github.com/MacDue updated
https://github.com/llvm/llvm-project/pull/112580
>From 88352d935b1d0aca24a296c8e086d4e63cb98dd4 Mon Sep 17 00:00:00 2001
From: Benjamin Maxwell
Date: Wed, 2 Oct 2024 10:28:29 +
Subject: [PATCH 1/7] [clang] Make -fveclib={ArmPL,SLEEF} imply -fno-math-errno
@@ -3125,6 +3140,13 @@ static void RenderFloatingPointOptions(const ToolChain
&TC, const Driver &D,
TrappingMathPresent = true;
FPExceptionBehavior = "strict";
break;
+case options::OPT_fveclib:
+ VecLibArg = A;
+ if (llvm::is_contained(VecLibIm
@@ -2960,6 +2969,12 @@ static void RenderFloatingPointOptions(const ToolChain
&TC, const Driver &D,
}
for (const Arg *A : Args) {
+auto CheckMathErrnoForVecLib =
+llvm::make_scope_exit([&, MathErrnoBeforeArg = MathErrno] {
+ if (NoMathErrnoWasImpliedB
MacDue wrote:
> > Have you checked the flang driver? Is it not applicable there since errno
> > is not used in Flang?
>
> We don't support the gfortran extension for checking errno in flang and I
> can't see another way of checking it portably, so I wonder if we should just
> have this flag o
https://github.com/MacDue updated
https://github.com/llvm/llvm-project/pull/112580
>From d8ac47d27ad860a8b11424621ab88cd9267cf866 Mon Sep 17 00:00:00 2001
From: Benjamin Maxwell
Date: Wed, 2 Oct 2024 10:28:29 +
Subject: [PATCH 1/4] [clang] Make -fveclib={ArmPL,SLEEF} imply -fno-math-errno
https://github.com/MacDue updated
https://github.com/llvm/llvm-project/pull/112580
>From d8ac47d27ad860a8b11424621ab88cd9267cf866 Mon Sep 17 00:00:00 2001
From: Benjamin Maxwell
Date: Wed, 2 Oct 2024 10:28:29 +
Subject: [PATCH 1/5] [clang] Make -fveclib={ArmPL,SLEEF} imply -fno-math-errno
https://github.com/MacDue closed
https://github.com/llvm/llvm-project/pull/110506
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/MacDue updated
https://github.com/llvm/llvm-project/pull/112580
>From ce7cac7c2fcc672abfd8ab2a49b59a73994bee64 Mon Sep 17 00:00:00 2001
From: Benjamin Maxwell
Date: Wed, 2 Oct 2024 10:28:29 +
Subject: [PATCH 1/7] [clang] Make -fveclib={ArmPL,SLEEF} imply -fno-math-errno
https://github.com/MacDue updated
https://github.com/llvm/llvm-project/pull/112580
>From ce7cac7c2fcc672abfd8ab2a49b59a73994bee64 Mon Sep 17 00:00:00 2001
From: Benjamin Maxwell
Date: Wed, 2 Oct 2024 10:28:29 +
Subject: [PATCH 1/8] [clang] Make -fveclib={ArmPL,SLEEF} imply -fno-math-errno
@@ -3410,7 +3410,8 @@ def fno_experimental_isel : Flag<["-"],
"fno-experimental-isel">, Group;
def fveclib : Joined<["-"], "fveclib=">, Group,
Visibility<[ClangOption, CC1Option, FlangOption, FC1Option]>,
-HelpText<"Use the given vector functions library">,
+HelpText<
https://github.com/MacDue updated
https://github.com/llvm/llvm-project/pull/112580
>From 3b84e05da76a2c9a7190095450aa4181bf199bd7 Mon Sep 17 00:00:00 2001
From: Benjamin Maxwell
Date: Wed, 2 Oct 2024 10:28:29 +
Subject: [PATCH 1/7] [clang] Make -fveclib={ArmPL,SLEEF} imply -fno-math-errno
https://github.com/MacDue updated
https://github.com/llvm/llvm-project/pull/114086
>From eae78e24f06ada3ebcc767319f5ad147bae27715 Mon Sep 17 00:00:00 2001
From: Benjamin Maxwell
Date: Mon, 9 Sep 2024 10:15:20 +
Subject: [PATCH] [clang] Add sincos builtin using `llvm.sincos` intrinsic
This
https://github.com/MacDue created
https://github.com/llvm/llvm-project/pull/114086
This registers `sincos[f|l]` as a clang builtin and updates GCBuiltin to emit
the `llvm.sincos.*` intrinsic when `-fno-math-errno` is set.
>From 3433ebee477c17f634fbc1b32ee7c297ff4c1942 Mon Sep 17 00:00:00 2001
@@ -722,6 +722,36 @@ static Value *emitFrexpBuiltin(CodeGenFunction &CGF, const
CallExpr *E,
return CGF.Builder.CreateExtractValue(Call, 0);
}
+static void emitSincosBuiltin(CodeGenFunction &CGF, const CallExpr *E,
+ llvm::Intrinsic::ID Intrinsi
https://github.com/MacDue updated
https://github.com/llvm/llvm-project/pull/114086
>From 7fd19eefa1d1f61843fe1844a72e14c7f4bae03b Mon Sep 17 00:00:00 2001
From: Benjamin Maxwell
Date: Mon, 9 Sep 2024 10:15:20 +
Subject: [PATCH] [clang] Add sincos builtin using `llvm.sincos` intrinsic
This
https://github.com/MacDue updated
https://github.com/llvm/llvm-project/pull/114086
>From 7fd19eefa1d1f61843fe1844a72e14c7f4bae03b Mon Sep 17 00:00:00 2001
From: Benjamin Maxwell
Date: Mon, 9 Sep 2024 10:15:20 +
Subject: [PATCH 1/2] [clang] Add sincos builtin using `llvm.sincos` intrinsic
T
MacDue wrote:
> CC @rohitaggarwal007 who added sincos vectorisation for amdlibm recently -
> hopefully we can get ensure amdlibm uses the new builtin + intrinsic safely
I have another patch #114039, that allows lowering the `llvm.sincos` intrinsic
to the existing vector function mappings. So o
https://github.com/MacDue created
https://github.com/llvm/llvm-project/pull/113673
Changed in #112580.
>From fa7576522c8dfc59365c6caa8407469a5a4d Mon Sep 17 00:00:00 2001
From: Benjamin Maxwell
Date: Fri, 25 Oct 2024 10:38:01 +
Subject: [PATCH] [clang][doc] Add release note for changes
https://github.com/MacDue closed
https://github.com/llvm/llvm-project/pull/112580
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/MacDue updated
https://github.com/llvm/llvm-project/pull/113673
>From fa7576522c8dfc59365c6caa8407469a5a4d Mon Sep 17 00:00:00 2001
From: Benjamin Maxwell
Date: Fri, 25 Oct 2024 10:38:01 +
Subject: [PATCH 1/2] [clang][doc] Add release note for changes to
`-fveclib={A
https://github.com/MacDue updated
https://github.com/llvm/llvm-project/pull/108853
>From ec50a22e21ab44daafe3913847bf831fdf398f79 Mon Sep 17 00:00:00 2001
From: Benjamin Maxwell
Date: Mon, 16 Sep 2024 16:27:23 +
Subject: [PATCH 1/6] Precommit math-libcalls-tbaa-indirect-args.c
---
.../mat
MacDue wrote:
> LGTM, but like I mentioned on #107598, it would be good if there was a test
> that requires the argument check, and the return check isn't sufficient
I've added a test case for `int ilogbl(long double a);` (which tests this in
the `MINGW32` case :+1:
https://github.com/llvm/l
MacDue wrote:
I'll land this later today if there's no objections :slightly_smiling_face:
https://github.com/llvm/llvm-project/pull/108853
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm
https://github.com/MacDue closed
https://github.com/llvm/llvm-project/pull/108853
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/MacDue updated
https://github.com/llvm/llvm-project/pull/108853
>From 6db9f6d56f0bbd56d017156f858eae68653fbd1b Mon Sep 17 00:00:00 2001
From: Benjamin Maxwell
Date: Mon, 16 Sep 2024 16:27:23 +
Subject: [PATCH 1/5] Precommit math-libcalls-tbaa-indirect-args.c
---
.../mat
@@ -686,12 +686,31 @@ static Value *EmitSignBit(CodeGenFunction &CGF, Value *V)
{
return CGF.Builder.CreateICmpSLT(V, Zero);
}
+/// Checks no arguments or results are passed indirectly in the ABI (i.e. via a
+/// hidden pointer). This is used to check annotating FP libcalls
https://github.com/MacDue updated
https://github.com/llvm/llvm-project/pull/110506
>From 328357f2300ebe55b8385c01f9c655f703933736 Mon Sep 17 00:00:00 2001
From: Benjamin Maxwell
Date: Mon, 30 Sep 2024 11:07:45 +
Subject: [PATCH 1/4] [IR] Allow fast math flags on calls with homogeneous FP
s
@@ -12472,9 +12472,8 @@ instruction's return value on the same edge).
The optional ``fast-math-flags`` marker indicates that the phi has one
or more :ref:`fast-math-flags `. These are optimization hints
to enable otherwise unsafe floating-point optimizations. Fast-math-flags
-a
https://github.com/MacDue updated
https://github.com/llvm/llvm-project/pull/110506
>From 328357f2300ebe55b8385c01f9c655f703933736 Mon Sep 17 00:00:00 2001
From: Benjamin Maxwell
Date: Mon, 30 Sep 2024 11:07:45 +
Subject: [PATCH 1/4] [IR] Allow fast math flags on calls with homogeneous FP
s
https://github.com/MacDue updated
https://github.com/llvm/llvm-project/pull/110506
>From 328357f2300ebe55b8385c01f9c655f703933736 Mon Sep 17 00:00:00 2001
From: Benjamin Maxwell
Date: Mon, 30 Sep 2024 11:07:45 +
Subject: [PATCH 1/5] [IR] Allow fast math flags on calls with homogeneous FP
s
@@ -1122,6 +1122,26 @@ define void @fastMathFlagsForArrayCalls([2 x float] %f,
[2 x double] %d1, [2 x <
ret void
}
+declare { float, float } @fmf_struct_f32()
+declare { double, double } @fmf_struct_f64()
+declare { <4 x double>, <4 x double> } @fmf_struct_v4f64()
+
+; CHEC
https://github.com/MacDue updated
https://github.com/llvm/llvm-project/pull/110506
>From 328357f2300ebe55b8385c01f9c655f703933736 Mon Sep 17 00:00:00 2001
From: Benjamin Maxwell
Date: Mon, 30 Sep 2024 11:07:45 +
Subject: [PATCH 1/5] [IR] Allow fast math flags on calls with homogeneous FP
s
https://github.com/MacDue updated
https://github.com/llvm/llvm-project/pull/110506
>From 328357f2300ebe55b8385c01f9c655f703933736 Mon Sep 17 00:00:00 2001
From: Benjamin Maxwell
Date: Mon, 30 Sep 2024 11:07:45 +
Subject: [PATCH 1/9] [IR] Allow fast math flags on calls with homogeneous FP
s
@@ -326,6 +326,21 @@ class FPMathOperator : public Operator {
/// precision.
float getFPAccuracy() const;
+ /// Returns true if `Ty` is a supported floating-point type for phi, select,
+ /// or call FPMathOperators.
+ static bool isSupportedFloatingPointType(Type *Ty) {
https://github.com/MacDue updated
https://github.com/llvm/llvm-project/pull/110506
>From 328357f2300ebe55b8385c01f9c655f703933736 Mon Sep 17 00:00:00 2001
From: Benjamin Maxwell
Date: Mon, 30 Sep 2024 11:07:45 +
Subject: [PATCH 1/9] [IR] Allow fast math flags on calls with homogeneous FP
s
https://github.com/MacDue updated
https://github.com/llvm/llvm-project/pull/110506
>From 328357f2300ebe55b8385c01f9c655f703933736 Mon Sep 17 00:00:00 2001
From: Benjamin Maxwell
Date: Mon, 30 Sep 2024 11:07:45 +
Subject: [PATCH 1/9] [IR] Allow fast math flags on calls with homogeneous FP
s
https://github.com/MacDue updated
https://github.com/llvm/llvm-project/pull/108853
>From 6db9f6d56f0bbd56d017156f858eae68653fbd1b Mon Sep 17 00:00:00 2001
From: Benjamin Maxwell
Date: Mon, 16 Sep 2024 16:27:23 +
Subject: [PATCH 1/5] Precommit math-libcalls-tbaa-indirect-args.c
---
.../mat
https://github.com/MacDue closed
https://github.com/llvm/llvm-project/pull/113673
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -36,16 +36,23 @@
/* Verify that the correct vector library is passed to LTO flags. */
// RUN: %clang -### --target=x86_64-unknown-linux-gnu -fveclib=LIBMVEC -flto
%s 2>&1 | FileCheck --check-prefix=CHECK-LTO-LIBMVEC %s
+// CHECK-LTO-LIBMVEC: "-fmath-errno"
// CHECK-LTO-LI
@@ -36,16 +36,23 @@
/* Verify that the correct vector library is passed to LTO flags. */
// RUN: %clang -### --target=x86_64-unknown-linux-gnu -fveclib=LIBMVEC -flto
%s 2>&1 | FileCheck --check-prefix=CHECK-LTO-LIBMVEC %s
+// CHECK-LTO-LIBMVEC: "-fmath-errno"
// CHECK-LTO-LI
https://github.com/MacDue edited
https://github.com/llvm/llvm-project/pull/112580
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/MacDue edited
https://github.com/llvm/llvm-project/pull/112580
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/MacDue updated
https://github.com/llvm/llvm-project/pull/112580
>From d8ac47d27ad860a8b11424621ab88cd9267cf866 Mon Sep 17 00:00:00 2001
From: Benjamin Maxwell
Date: Wed, 2 Oct 2024 10:28:29 +
Subject: [PATCH 1/2] [clang] Make -fveclib={ArmPL,SLEEF} imply -fno-math-errno
https://github.com/MacDue edited
https://github.com/llvm/llvm-project/pull/112580
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/MacDue updated
https://github.com/llvm/llvm-project/pull/112580
>From d8ac47d27ad860a8b11424621ab88cd9267cf866 Mon Sep 17 00:00:00 2001
From: Benjamin Maxwell
Date: Wed, 2 Oct 2024 10:28:29 +
Subject: [PATCH 1/3] [clang] Make -fveclib={ArmPL,SLEEF} imply -fno-math-errno
https://github.com/MacDue updated
https://github.com/llvm/llvm-project/pull/112580
>From d8ac47d27ad860a8b11424621ab88cd9267cf866 Mon Sep 17 00:00:00 2001
From: Benjamin Maxwell
Date: Wed, 2 Oct 2024 10:28:29 +
Subject: [PATCH 1/3] [clang] Make -fveclib={ArmPL,SLEEF} imply -fno-math-errno
@@ -36,16 +36,23 @@
/* Verify that the correct vector library is passed to LTO flags. */
// RUN: %clang -### --target=x86_64-unknown-linux-gnu -fveclib=LIBMVEC -flto
%s 2>&1 | FileCheck --check-prefix=CHECK-LTO-LIBMVEC %s
+// CHECK-LTO-LIBMVEC: "-fmath-errno"
// CHECK-LTO-LI
https://github.com/MacDue ready_for_review
https://github.com/llvm/llvm-project/pull/116391
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/MacDue created
https://github.com/llvm/llvm-project/pull/116391
If `__attribute__((flatten))` is used on a function don't inline any callees
with incompatible streaming attributes. Without this check, clang may produce
incorrect code when `flatten` is used in code with strea
https://github.com/MacDue edited
https://github.com/llvm/llvm-project/pull/116391
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1143,30 +1146,63 @@ void AArch64TargetCodeGenInfo::checkFunctionABI(
}
}
-void AArch64TargetCodeGenInfo::checkFunctionCallABIStreaming(
-CodeGenModule &CGM, SourceLocation CallLoc, const FunctionDecl *Caller,
-const FunctionDecl *Callee) const {
- if (!Caller ||
https://github.com/MacDue updated
https://github.com/llvm/llvm-project/pull/116391
>From 90daf9c544bcb776c8a68ad504ba5eda50eafe8a Mon Sep 17 00:00:00 2001
From: Benjamin Maxwell
Date: Fri, 15 Nov 2024 14:35:41 +
Subject: [PATCH 1/6] [clang][SME] Ignore flatten for callees mismatched
stream
MacDue wrote:
> > > How does this interact with #107598?
> >
> >
> > Though this also changes things to ensure when TBAA data is set, it's
> > always set on the call.
>
> Wasn't already doing that? (setting the TBAA on the call?).
It was setting it on `cast(Call.getScalarVal());` not the
ca
https://github.com/MacDue updated
https://github.com/llvm/llvm-project/pull/108853
>From 6db9f6d56f0bbd56d017156f858eae68653fbd1b Mon Sep 17 00:00:00 2001
From: Benjamin Maxwell
Date: Mon, 16 Sep 2024 16:27:23 +
Subject: [PATCH 1/3] Precommit math-libcalls-tbaa-indirect-args.c
---
.../mat
MacDue wrote:
> > > > > How does this interact with #107598?
> > > >
> > > >
> > > > Though this also changes things to ensure when TBAA data is set, it's
> > > > always set on the call.
> > >
> > >
> > > Wasn't already doing that? (setting the TBAA on the call?).
> >
> >
> > It was settin
MacDue wrote:
> Not really! `int TBAA` in in our downstream compiler is interpreted as
> describing the function arguments (they are not int) and the `load/store` of
> the argument before the library call are begin eliminated which result in
> unexpected behavior.
> I am not objecting to anyth
MacDue wrote:
> Not really! int TBAA in in our downstream compiler is interpreted as
> describing the function arguments (they are not int) and the load/store of
> the argument before the library call are begin eliminated which result in
> unexpected behavior.
Oh wait, then you say "not reall
https://github.com/MacDue updated
https://github.com/llvm/llvm-project/pull/108853
>From 6db9f6d56f0bbd56d017156f858eae68653fbd1b Mon Sep 17 00:00:00 2001
From: Benjamin Maxwell
Date: Mon, 16 Sep 2024 16:27:23 +
Subject: [PATCH 1/4] Precommit math-libcalls-tbaa-indirect-args.c
---
.../mat
MacDue wrote:
> Yes exactly! Have you tried running the test case in patch #107598 to see
> what IR it generates?
I've updated my test (based on yours), and I think you can now see the TBAA
metadata is only set on the call when the arguments are not being passed via
pointers.
https://github
MacDue wrote:
Typo in PR title `flang` -> `flag`
https://github.com/llvm/llvm-project/pull/116432
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/MacDue updated
https://github.com/llvm/llvm-project/pull/116391
>From 90daf9c544bcb776c8a68ad504ba5eda50eafe8a Mon Sep 17 00:00:00 2001
From: Benjamin Maxwell
Date: Fri, 15 Nov 2024 14:35:41 +
Subject: [PATCH 1/5] [clang][SME] Ignore flatten for callees mismatched
stream
https://github.com/MacDue updated
https://github.com/llvm/llvm-project/pull/116391
>From 90daf9c544bcb776c8a68ad504ba5eda50eafe8a Mon Sep 17 00:00:00 2001
From: Benjamin Maxwell
Date: Fri, 15 Nov 2024 14:35:41 +
Subject: [PATCH 1/5] [clang][SME] Ignore flatten for callees mismatched
stream
MacDue wrote:
Is this intentionally left as a draft?
https://github.com/llvm/llvm-project/pull/116422
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/MacDue created
https://github.com/llvm/llvm-project/pull/118956
Previously, this hit an `llvm_unreachable()` assertion as the type of `vec_t`
did not exactly match the return type of `svdup_s8`, as it was wrapped in a
typedef.
Comparing the canonical types instead allows th
https://github.com/MacDue updated
https://github.com/llvm/llvm-project/pull/118956
>From cb9857aad6f84e4ac473f572a828ea5db6d4fd58 Mon Sep 17 00:00:00 2001
From: Benjamin Maxwell
Date: Fri, 6 Dec 2024 11:42:11 +
Subject: [PATCH 1/2] [clang][AArch64] Fix C++11 style initialization of
typedef
https://github.com/MacDue updated
https://github.com/llvm/llvm-project/pull/121763
>From 2cadacae4359f8d67bdff850738441fba455a8bc Mon Sep 17 00:00:00 2001
From: Benjamin Maxwell
Date: Mon, 6 Jan 2025 11:49:48 +
Subject: [PATCH 1/2] [clang] Lower non-builtin sincos[f|l] calls to
llvm.sincos
@@ -1,5 +1,19 @@
-// RUN: %clang_cc1 -triple=aarch64-gnu-linux -emit-llvm -O1 %s -o - |
FileCheck --check-prefix=NO-MATH-ERRNO %s
-// RUN: %clang_cc1 -triple=aarch64-gnu-linux -emit-llvm -fmath-errno %s -o - |
FileCheck --check-prefix=MATH-ERRNO %s
+// RUN: %clang_cc1 -triple=aa
@@ -1328,4 +1328,57 @@ void SemaARM::handleInterruptAttr(Decl *D, const
ParsedAttr &AL) {
ARMInterruptAttr(getASTContext(), AL, Kind));
}
+// Check if the function definition uses any AArch64 SME features without
+// having the '+sme' feature enabled and warn
@@ -1328,4 +1328,57 @@ void SemaARM::handleInterruptAttr(Decl *D, const
ParsedAttr &AL) {
ARMInterruptAttr(getASTContext(), AL, Kind));
}
+// Check if the function definition uses any AArch64 SME features without
+// having the '+sme' feature enabled and warn
https://github.com/MacDue approved this pull request.
LGTM :+1: You could maybe add a test to
`clang/test/CodeGen/AArch64/sme-inline-callees-streaming-attrs.c` too (which
tests `flatten`/`always_inline` statements.
https://github.com/llvm/llvm-project/pull/121338
__
https://github.com/MacDue updated
https://github.com/llvm/llvm-project/pull/114086
>From 5a5495d010fb1715b0e711376767d5ff3cd5cc98 Mon Sep 17 00:00:00 2001
From: Benjamin Maxwell
Date: Mon, 9 Sep 2024 10:15:20 +
Subject: [PATCH 1/6] [clang] Add sincos builtin using `llvm.sincos` intrinsic
T
https://github.com/MacDue edited
https://github.com/llvm/llvm-project/pull/114086
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -3232,6 +3264,22 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl
GD, unsigned BuiltinID,
return RValue::get(emitUnaryMaybeConstrainedFPBuiltin(
*this, E, Intrinsic::sinh,
Intrinsic::experimental_constrained_sinh));
+case Builtin::BIsincos:
@@ -4593,9 +4593,14 @@ class FunctionType : public Type {
SME_ZT0Shift = 5,
SME_ZT0Mask = 0b111 << SME_ZT0Shift,
+// A bit to tell whether a function is agnostic about sme ZA state.
+SME_AgnosticZAStateShift = 8,
+SME_AgnosticZAStateMask = 1 << SME_Agnostic
@@ -7745,6 +7746,38 @@ static bool checkMutualExclusion(TypeProcessingState
&state,
return true;
}
+static bool handleArmAgnosticAttribute(Sema &S,
+ FunctionProtoType::ExtProtoInfo &EPI,
+ ParsedAt
@@ -7559,6 +7559,26 @@ The attributes ``__arm_in(S)``, ``__arm_out(S)``,
``__arm_inout(S)`` and
}];
}
+def ArmAgnosticDocs : Documentation {
+ let Category = DocCatArmSmeAttributes;
+ let Content = [{
+The ``__arm_agnostic`` keyword applies to prototyped function types an
@@ -3835,6 +3835,9 @@ def err_sme_unimplemented_za_save_restore : Error<
"call to a function that shares state other than 'za' from a "
"function that has live 'za' state requires a spill/fill of ZA, which is not
yet "
"implemented">;
+def err_sme_unimplemented_agnostic_
@@ -7559,6 +7559,26 @@ The attributes ``__arm_in(S)``, ``__arm_out(S)``,
``__arm_inout(S)`` and
}];
}
+def ArmAgnosticDocs : Documentation {
+ let Category = DocCatArmSmeAttributes;
+ let Content = [{
+The ``__arm_agnostic`` keyword applies to prototyped function types an
https://github.com/MacDue closed
https://github.com/llvm/llvm-project/pull/114086
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/MacDue edited
https://github.com/llvm/llvm-project/pull/121338
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
MacDue wrote:
> > LGTM 👍 You could maybe add a test to
> > `clang/test/CodeGen/AArch64/sme-inline-callees-streaming-attrs.c` too
> > (which tests `flatten`/`always_inline` statements).
>
> Thanks for approving the changes! I did already add some tests to
> sme-inline-callees-streaming-attrs.c
1 - 100 of 225 matches
Mail list logo