ilinpv wrote:
Documentation update https://github.com/llvm/llvm-project/pull/84098
https://github.com/llvm/llvm-project/pull/82378
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
eaeltsin wrote:
Thanks @ilinpv !
https://github.com/llvm/llvm-project/pull/82378
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
ilinpv wrote:
Fix on review https://github.com/llvm/llvm-project/pull/83515
The documentation is coming next.
https://github.com/llvm/llvm-project/pull/82378
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
DanielKristofKiss wrote:
@bgra8 Correct, submitted #83407.
https://github.com/llvm/llvm-project/pull/82378
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
bgra8 wrote:
@DanielKristofKiss do I understand correctly that you confirm the current
behavior for `__builtin_cpu_supports("unsupported-features")` -- does not
compile no matter the CPU -- is a `clang` defect?
If that is the case let's file a bug to have this fixed.
eaeltsin wrote:
Thanks @DanielKristofKiss - considering compilations with older toolchains is a
good reason to choose the particular behavior. It would be very valuable if all
these reasons and the selected behavior for unsupported builtins/parameters are
documented, i.e. here -
DanielKristofKiss wrote:
Backward\forward compatibility force us to support any parameter in
`__builtin_cpu_supports `.
A given codebase and toolchain add support for a new feature and everything
works but we can't assume all cases the toolchain is up to date where the
project is used so an
eaeltsin wrote:
@ilinpv the problem is that a lot of third party code out there might fail to
compile now because it assumes GCC's behavior for invalid
`__builtin_cpu_supports`. At least we can see many breakages in the third party
that we use in our codebase.
By intentionally diverging from
ilinpv wrote:
@alexfh thanks for example, clang doesn't compile that on x86 before patch as
well. It looks like a bug in GCC that it happily compiles the builtin above on
x86.
https://github.com/llvm/llvm-project/pull/82378
___
cfe-commits mailing
alexfh wrote:
This makes the clang diverge from the GCC behavior, for example, GCC happily
compiles `(void)__builtin_cpu_supports("neon");` on x86, but clang doesn't
after this patch: https://gcc.godbolt.org/z/a367Pd7sE
https://github.com/llvm/llvm-project/pull/82378
DanielKristofKiss wrote:
> Hello,
>
> This patch makes the second line fail to compile
>
> ```
> #elif ABSL_HAVE_BUILTIN(__builtin_cpu_supports)
> if (__builtin_cpu_supports("avx2")) {
> ```
>
> `error: invalid cpu feature string for builtin` when built on arm
expected to fail as
asmok-g wrote:
Hello,
This patch makes the following line fail to compile
```
#elif ABSL_HAVE_BUILTIN(__builtin_cpu_supports)
if (__builtin_cpu_supports("avx2")) {
```
`error: invalid cpu feature string for builtin` when built on arm
https://github.com/llvm/llvm-project/pull/82378
https://github.com/ilinpv closed https://github.com/llvm/llvm-project/pull/82378
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ilinpv updated
https://github.com/llvm/llvm-project/pull/82378
>From 7283a6f34de8ca26aa36fcf83356f71f6f59a82f Mon Sep 17 00:00:00 2001
From: Pavel Iliin
Date: Tue, 20 Feb 2024 02:01:04 +
Subject: [PATCH 1/2] [AArch64] Implement __builtin_cpu_supports, compiler-rt
tests.
https://github.com/ilinpv updated
https://github.com/llvm/llvm-project/pull/82378
>From 7ada935c9000e915acc9433341e8d4317ff158d6 Mon Sep 17 00:00:00 2001
From: Pavel Iliin
Date: Tue, 20 Feb 2024 02:01:04 +
Subject: [PATCH 1/2] [AArch64] Implement __builtin_cpu_supports, compiler-rt
tests.
https://github.com/jroelofs approved this pull request.
https://github.com/llvm/llvm-project/pull/82378
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -14025,6 +14028,19 @@ Value *CodeGenFunction::EmitX86CpuInit() {
return Builder.CreateCall(Func);
}
+Value *CodeGenFunction::EmitAArch64CpuSupports(const CallExpr *E) {
+ const Expr *ArgExpr = E->getArg(0)->IgnoreParenCasts();
+ StringRef ArgStr =
https://github.com/ilinpv updated
https://github.com/llvm/llvm-project/pull/82378
>From 7ada935c9000e915acc9433341e8d4317ff158d6 Mon Sep 17 00:00:00 2001
From: Pavel Iliin
Date: Tue, 20 Feb 2024 02:01:04 +
Subject: [PATCH] [AArch64] Implement __builtin_cpu_supports, compiler-rt
tests.
@@ -14025,6 +14028,19 @@ Value *CodeGenFunction::EmitX86CpuInit() {
return Builder.CreateCall(Func);
}
+Value *CodeGenFunction::EmitAArch64CpuSupports(const CallExpr *E) {
+ const Expr *ArgExpr = E->getArg(0)->IgnoreParenCasts();
+ StringRef ArgStr =
llvmbot wrote:
@llvm/pr-subscribers-clang-codegen
@llvm/pr-subscribers-clang
Author: Pavel Iliin (ilinpv)
Changes
The patch complements https://github.com/llvm/llvm-project/pull/68919 and adds
AArch64 support for builtin
`__builtin_cpu_supports("feature1+...+featureN")`
which return true
https://github.com/ilinpv created
https://github.com/llvm/llvm-project/pull/82378
The patch complements https://github.com/llvm/llvm-project/pull/68919 and adds
AArch64 support for builtin
`__builtin_cpu_supports("feature1+...+featureN")`
which return true if all specified CPU features in
21 matches
Mail list logo