https://github.com/nikic closed https://github.com/llvm/llvm-project/pull/90824
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/90824
___
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/90824
>From ff4658cf7661003d940452251147ee58315c774c Mon Sep 17 00:00:00 2001
From: Nikita Popov
Date: Thu, 2 May 2024 12:11:18 +0900
Subject: [PATCH 1/7] Add support for getelementptr nusw and nuw
---
nikic wrote:
There's already another approval from @aeubanks, so I plan to merge this next
Monday if there's no more feedback.
https://github.com/llvm/llvm-project/pull/90824
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
goldsteinn wrote:
LGTM. Wait on some additional approvals to push please.
https://github.com/llvm/llvm-project/pull/90824
___
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/90824
>From b74cc982c95f7750a581e93bc0f246786c69ef3d Mon Sep 17 00:00:00 2001
From: Nikita Popov
Date: Thu, 2 May 2024 12:11:18 +0900
Subject: [PATCH 1/7] Add support for getelementptr nusw and nuw
---
@@ -0,0 +1,93 @@
+//===-- llvm/GEPNoWrapFlags.h - NoWrap flags for GEPs ---*- C++
-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier:
@@ -0,0 +1,93 @@
+//===-- llvm/GEPNoWrapFlags.h - NoWrap flags for GEPs ---*- C++
-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier:
https://github.com/nikic updated https://github.com/llvm/llvm-project/pull/90824
>From 009ffa45c131982caac5b9025678cde0418ac003 Mon Sep 17 00:00:00 2001
From: Nikita Popov
Date: Thu, 2 May 2024 12:11:18 +0900
Subject: [PATCH 1/7] Add support for getelementptr nusw and nuw
---
@@ -0,0 +1,86 @@
+//===-- llvm/GEPNoWrapFlags.h - NoWrap flags for GEPs ---*- C++
-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier:
https://github.com/aeubanks approved this pull request.
thanks, I think abstracting out GEPNoWrapFlags is good
https://github.com/llvm/llvm-project/pull/90824
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
@@ -0,0 +1,86 @@
+//===-- llvm/GEPNoWrapFlags.h - NoWrap flags for GEPs ---*- C++
-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier:
https://github.com/aeubanks edited
https://github.com/llvm/llvm-project/pull/90824
___
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/90824
>From 009ffa45c131982caac5b9025678cde0418ac003 Mon Sep 17 00:00:00 2001
From: Nikita Popov
Date: Thu, 2 May 2024 12:11:18 +0900
Subject: [PATCH 1/5] Add support for getelementptr nusw and nuw
---
@@ -1699,8 +1701,12 @@ Expected
BitcodeReader::materializeValue(unsigned StartValID,
I = GetElementPtrInst::Create(BC->SrcElemTy, Ops[0],
ArrayRef(Ops).drop_front(), "constexpr",
InsertBB);
-
@@ -316,3 +316,82 @@ define <2 x i32> @test_trunc_both_reversed_vector(<2 x
i64> %a) {
%res = trunc nsw nuw <2 x i64> %a to <2 x i32>
ret <2 x i32> %res
}
+
+define ptr @gep_nuw(ptr %p, i64 %idx) {
+; CHECK: %gep = getelementptr nuw i8, ptr %p, i64 %idx
+ %gep =
@@ -11295,27 +11297,46 @@ memory though, even if it happens to point into
allocated storage. See the
:ref:`Pointer Aliasing Rules ` section for more
information.
-If the ``inbounds`` keyword is present, the result value of a
-``getelementptr`` with any non-zero indices is a
https://github.com/nikic updated https://github.com/llvm/llvm-project/pull/90824
>From eb27a1b94ec807323d204b51d5c01cc22056e1c7 Mon Sep 17 00:00:00 2001
From: Nikita Popov
Date: Thu, 2 May 2024 12:11:18 +0900
Subject: [PATCH 1/4] Add support for getelementptr nusw and nuw
---
nikic wrote:
> Are the TODOs encompassing all the cases? Why we don't want to set the flags
> in `PHITransAddr` as well?
No, the TODOs are only for places where I had to modify code, but the used
implementation is obviously non-optimal to minimize initial impact. There are
many more places
@@ -316,3 +316,82 @@ define <2 x i32> @test_trunc_both_reversed_vector(<2 x
i64> %a) {
%res = trunc nsw nuw <2 x i64> %a to <2 x i32>
ret <2 x i32> %res
}
+
+define ptr @gep_nuw(ptr %p, i64 %idx) {
+; CHECK: %gep = getelementptr nuw i8, ptr %p, i64 %idx
+ %gep =
@@ -1699,8 +1701,12 @@ Expected
BitcodeReader::materializeValue(unsigned StartValID,
I = GetElementPtrInst::Create(BC->SrcElemTy, Ops[0],
ArrayRef(Ops).drop_front(), "constexpr",
InsertBB);
-
@@ -1699,8 +1701,12 @@ Expected
BitcodeReader::materializeValue(unsigned StartValID,
I = GetElementPtrInst::Create(BC->SrcElemTy, Ops[0],
ArrayRef(Ops).drop_front(), "constexpr",
InsertBB);
-
@@ -11295,27 +11297,46 @@ memory though, even if it happens to point into
allocated storage. See the
:ref:`Pointer Aliasing Rules ` section for more
information.
-If the ``inbounds`` keyword is present, the result value of a
-``getelementptr`` with any non-zero indices is a
@@ -11295,27 +11297,46 @@ memory though, even if it happens to point into
allocated storage. See the
:ref:`Pointer Aliasing Rules ` section for more
information.
-If the ``inbounds`` keyword is present, the result value of a
-``getelementptr`` with any non-zero indices is a
antoniofrighetto wrote:
Are the TODOs encompassing all the cases? Why we don't want to set the flags in
`PHITransAddr` as well?
https://github.com/llvm/llvm-project/pull/90824
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
tschuett wrote:
Could you please add a TODO here:
https://github.com/llvm/llvm-project/blob/e3f42b02a4129947ca2dd820bfb63ffed83027b7/llvm/lib/CodeGen/MachineInstr.cpp#L565
Thanks.
https://github.com/llvm/llvm-project/pull/90824
___
cfe-commits mailing
https://github.com/nikic updated https://github.com/llvm/llvm-project/pull/90824
>From eb27a1b94ec807323d204b51d5c01cc22056e1c7 Mon Sep 17 00:00:00 2001
From: Nikita Popov
Date: Thu, 2 May 2024 12:11:18 +0900
Subject: [PATCH 1/2] Add support for getelementptr nusw and nuw
---
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 3d65bd935a91439c483c56a966edc283a2b1130d
e6d87106fd677c98422efa97dffef600b053853c --
llvmbot wrote:
@llvm/pr-subscribers-llvm-transforms
Author: Nikita Popov (nikic)
Changes
This implements the `nusw` and `nuw` flags for `getelementptr` as proposed at
https://discourse.llvm.org/t/rfc-add-nusw-and-nuw-flags-for-getelementptr/78672.
There are a bunch of places annotated
llvmbot wrote:
@llvm/pr-subscribers-backend-amdgpu
Author: Nikita Popov (nikic)
Changes
This implements the `nusw` and `nuw` flags for `getelementptr` as proposed at
https://discourse.llvm.org/t/rfc-add-nusw-and-nuw-flags-for-getelementptr/78672.
There are a bunch of places annotated
https://github.com/nikic created https://github.com/llvm/llvm-project/pull/90824
This implements the `nusw` and `nuw` flags for `getelementptr` as proposed at
https://discourse.llvm.org/t/rfc-add-nusw-and-nuw-flags-for-getelementptr/78672.
There are a bunch of places annotated with
31 matches
Mail list logo