llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder
`openmp-offload-libc-amdgpu-runtime` running on `omp-vega20-1` while building
`clang` at step 7 "Add check check-offload".
Full details are available at:
https://lab.llvm.org/buildbot/#/builders/73/builds/12566
Here is the r
https://github.com/nikic closed https://github.com/llvm/llvm-project/pull/122486
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/AaronBallman approved this pull request.
LGTM!
https://github.com/llvm/llvm-project/pull/122486
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/nikic updated
https://github.com/llvm/llvm-project/pull/122486
>From 925f74cad21eb6c46514d1ae543ac202073baf27 Mon Sep 17 00:00:00 2001
From: Nikita Popov
Date: Fri, 10 Jan 2025 17:01:07 +0100
Subject: [PATCH 1/5] [Clang] Add -fwrapv-pointer flag
GCC supports three flags rela
@@ -1,11 +1,20 @@
// RUN: %clang -### -S -fwrapv -fno-wrapv -fwrapv %s 2>&1 | FileCheck
-check-prefix=CHECK1 %s
// CHECK1: -fwrapv
//
+// RUN: %clang -### -S -fwrapv-pointer -fno-wrapv-pointer -fwrapv-pointer %s
2>&1 | FileCheck -check-prefix=CHECK1-POINTER %s
+// CHECK1-POIN
@@ -1,11 +1,20 @@
// RUN: %clang -### -S -fwrapv -fno-wrapv -fwrapv %s 2>&1 | FileCheck
-check-prefix=CHECK1 %s
// CHECK1: -fwrapv
//
+// RUN: %clang -### -S -fwrapv-pointer -fno-wrapv-pointer -fwrapv-pointer %s
2>&1 | FileCheck -check-prefix=CHECK1-POINTER %s
+// CHECK1-POIN
https://github.com/MaskRay edited
https://github.com/llvm/llvm-project/pull/122486
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/MaskRay approved this pull request.
Will be used by chromium and other users. There is some gap in sanitizer that
is not so important.
LGTM, but other reviewers need to stamp as well.
https://github.com/llvm/llvm-project/pull/122486
__
@@ -4311,14 +4311,14 @@ LValue CodeGenFunction::EmitArraySubscriptExpr(const
ArraySubscriptExpr *E,
// GEP indexes are signed, and scaling an index isn't permitted to
// signed-overflow, so we use the same semantics for our explicit
// multiply. We suppress this i
@@ -4311,14 +4311,14 @@ LValue CodeGenFunction::EmitArraySubscriptExpr(const
ArraySubscriptExpr *E,
// GEP indexes are signed, and scaling an index isn't permitted to
// signed-overflow, so we use the same semantics for our explicit
// multiply. We suppress this i
https://github.com/efriedma-quic edited
https://github.com/llvm/llvm-project/pull/122486
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/efriedma-quic commented:
CC @llvm/clang-vendors : this changes the behavior of -fwrapv.
Internally, I expect it's going to be a bit painful to communicate to all our
internal teams that they need to change their -fwrapv usage to
-fno-strict-overflow, but if we think it's imp
@@ -1,11 +1,24 @@
// RUN: %clang -### -S -fwrapv -fno-wrapv -fwrapv %s 2>&1 | FileCheck
-check-prefix=CHECK1 %s
// CHECK1: -fwrapv
//
+// RUN: %clang -### -S -fwrapv-pointer -fno-wrapv-pointer -fwrapv-pointer %s
2>&1 | FileCheck -check-prefix=CHECK1-POINTER %s
+// CHECK1-POIN
https://github.com/nikic updated
https://github.com/llvm/llvm-project/pull/122486
>From 925f74cad21eb6c46514d1ae543ac202073baf27 Mon Sep 17 00:00:00 2001
From: Nikita Popov
Date: Fri, 10 Jan 2025 17:01:07 +0100
Subject: [PATCH 1/3] [Clang] Add -fwrapv-pointer flag
GCC supports three flags rela
@@ -1,11 +1,24 @@
// RUN: %clang -### -S -fwrapv -fno-wrapv -fwrapv %s 2>&1 | FileCheck
-check-prefix=CHECK1 %s
// CHECK1: -fwrapv
//
+// RUN: %clang -### -S -fwrapv-pointer -fno-wrapv-pointer -fwrapv-pointer %s
2>&1 | FileCheck -check-prefix=CHECK1-POINTER %s
+// CHECK1-POIN
@@ -57,15 +57,6 @@ void test1(void) {
// TRAPV_HANDLER: foo(
--a;
- // -fwrapv should turn off inbounds for GEP's, PR9256
- extern int* P;
- ++P;
- // DEFAULT: getelementptr inbounds nuw i32, ptr
- // WRAPV: getelementptr i32, ptr
- // TRAPV: getelementptr inbounds
https://github.com/nikic updated
https://github.com/llvm/llvm-project/pull/122486
>From 925f74cad21eb6c46514d1ae543ac202073baf27 Mon Sep 17 00:00:00 2001
From: Nikita Popov
Date: Fri, 10 Jan 2025 17:01:07 +0100
Subject: [PATCH 1/2] [Clang] Add -fwrapv-pointer flag
GCC supports three flags rela
https://github.com/nikic updated
https://github.com/llvm/llvm-project/pull/122486
>From 925f74cad21eb6c46514d1ae543ac202073baf27 Mon Sep 17 00:00:00 2001
From: Nikita Popov
Date: Fri, 10 Jan 2025 17:01:07 +0100
Subject: [PATCH 1/2] [Clang] Add -fwrapv-pointer flag
GCC supports three flags rela
@@ -79,7 +79,15 @@ code bases.
Undefined behavior due to pointer addition overflow can be reliably detected
using ``-fsanitize=pointer-overflow``. It is also possible to use
``-fno-strict-overflow`` to opt-in to a language dialect where signed integer
- and pointer overf
@@ -57,15 +57,6 @@ void test1(void) {
// TRAPV_HANDLER: foo(
--a;
- // -fwrapv should turn off inbounds for GEP's, PR9256
- extern int* P;
- ++P;
- // DEFAULT: getelementptr inbounds nuw i32, ptr
- // WRAPV: getelementptr i32, ptr
- // TRAPV: getelementptr inbounds
https://github.com/AaronBallman edited
https://github.com/llvm/llvm-project/pull/122486
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/AaronBallman commented:
The changes look correct to me, but I'd love to hear from the codegen and
sanitizer experts as to whether they agree with the changes and the timeline to
land it for 20.
https://github.com/llvm/llvm-project/pull/122486
AaronBallman wrote:
I am a bit concerned about the behavioral change, but given the more aggressive
optimizations in LLVM 20, I think it makes sense to get this into Clang 20 to
see what the fallout is during early RCs. If there's negative impact, we can
consider cherry-picking a revert from t
nikic wrote:
If we want to make this change, I think doing it for Clang 20 would be ideal,
because it is related to the pointer overflow optimization changes in that
release.
https://github.com/llvm/llvm-project/pull/122486
___
cfe-commits mailing li
https://github.com/shafik commented:
I feel like matching gcc's behavior makes sense for users but I am not sure
about the timing for clang-20. This seems like the change in behavior could be
impactful.
https://github.com/llvm/llvm-project/pull/122486
__
carlocab wrote:
> Matching gcc's behavior for -f flags both compilers have also makes sense,
> IMHO.
Agree with this, FWIW.
https://github.com/llvm/llvm-project/pull/122486
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.or
https://github.com/nikic updated
https://github.com/llvm/llvm-project/pull/122486
>From 925f74cad21eb6c46514d1ae543ac202073baf27 Mon Sep 17 00:00:00 2001
From: Nikita Popov
Date: Fri, 10 Jan 2025 17:01:07 +0100
Subject: [PATCH] [Clang] Add -fwrapv-pointer flag
GCC supports three flags related
nico wrote:
We (chromium) turned on fwrapv due to the pointer changes, and it had a bit of
a perf hit. We'd probably switch to this, hoping it'd address the perf issues
at least some.
Matching gcc's behavior for -f flags both compilers have also makes sense, IMHO.
https://github.com/llvm/llvm
nikic wrote:
> I'm tempted to say we should just treat
> -fwrapv/-fwrapv-pointer/-fno-strict-overflow as aliases for each other. I
> don't think anyone using -fwrapv is going to be happy that we're turning on
> overflow optimizations.
Yeah, I'm not entirely sure this change is worthwhile eith
efriedma-quic wrote:
I'm tempted to say we should just treat
-fwrapv/-fwrapv-pointer/-fno-strict-overflow as aliases for each other. I
don't think anyone using -fwrapv is going to be happy that we're turning on
overflow optimizations.
https://github.com/llvm/llvm-project/pull/122486
https://github.com/nikic updated
https://github.com/llvm/llvm-project/pull/122486
>From b32e3e1eee4b359ae2f0a1563420104de8d52277 Mon Sep 17 00:00:00 2001
From: Nikita Popov
Date: Fri, 10 Jan 2025 17:01:07 +0100
Subject: [PATCH] [Clang] Add -fwrapv-pointer flag
GCC supports three flags related
https://github.com/nikic updated
https://github.com/llvm/llvm-project/pull/122486
>From 1f3737d2eeb7681cb57a66f7bd6c4614cd038aac Mon Sep 17 00:00:00 2001
From: Nikita Popov
Date: Fri, 10 Jan 2025 17:01:07 +0100
Subject: [PATCH] [Clang] Add -fwrapv-pointer flag
GCC supports three flags related
https://github.com/nikic updated
https://github.com/llvm/llvm-project/pull/122486
>From b8c7a369fffecc9d1811d286fb1536346045fb74 Mon Sep 17 00:00:00 2001
From: Nikita Popov
Date: Fri, 10 Jan 2025 17:01:07 +0100
Subject: [PATCH] [Clang] Add -fwrapv-pointer flag
GCC supports three flags related
github-actions[bot] wrote:
:warning: C/C++ code formatter, clang-format found issues in your code.
:warning:
You can test this locally with the following command:
``bash
git-clang-format --diff c39500f88c93f668c68bdafe56bd8d16e8abbec1
32fe619505787c434f97b01da0458ba7861f9550 --e
llvmbot wrote:
@llvm/pr-subscribers-clang-driver
Author: Nikita Popov (nikic)
Changes
GCC supports three flags related to overflow behavior:
* `-fwrapv`: Makes signed integer overflow well-defined.
* `-fwrapv-pointer`: Makes pointer overflow well-defined.
* `-fno-strict-overflow`: Impli
https://github.com/nikic created
https://github.com/llvm/llvm-project/pull/122486
GCC supports three flags related to overflow behavior:
* `-fwrapv`: Makes signed integer overflow well-defined.
* `-fwrapv-pointer`: Makes pointer overflow well-defined.
* `-fno-strict-overflow`: Implies `-fwrap
36 matches
Mail list logo