@@ -1011,6 +1011,31 @@ static Value *foldPHINodeOrSelectInst(Instruction &I) {
return foldSelectInst(cast(I));
}
+/// Returns a fixed vector type equivalent to the memory set by II or nullptr
if
+/// unable to do so.
+static FixedVectorType *getVectorTypeFor(const MemSetIns
https://github.com/macurtis-amd updated
https://github.com/llvm/llvm-project/pull/133301
>From 30b4ca3cc90ab043db7abb336d028e8bb8b71dcf Mon Sep 17 00:00:00 2001
From: Matthew Curtis
Date: Thu, 27 Mar 2025 14:04:40 -0500
Subject: [PATCH 1/4] [SROA] Vector promote some memsets
---
clang/test/Co
macurtis-amd wrote:
> The tests also don't make any sense to me, seeing as they compile down to a
> constant, unused insertelement.
@nikic I cleaned up the test function a bit, again starting from the original
example. They exercise the new code paths, though they still result in an
unused in
https://github.com/macurtis-amd updated
https://github.com/llvm/llvm-project/pull/133301
>From 51dd5f27b9a09851c746466f02821087305ad93c Mon Sep 17 00:00:00 2001
From: Matthew Curtis
Date: Thu, 27 Mar 2025 14:04:40 -0500
Subject: [PATCH 1/5] [SROA] Vector promote some memsets
---
clang/test/Co
macurtis-amd wrote:
Thanks Nikita for taking a look at this.
> Missing PR description.
I've updated the PR description.
> The tests also don't make any sense to me, seeing as they compile down to a
> constant, unused insertelement.
Yes. Tests are very synthetic. Reduced from the already red
https://github.com/macurtis-amd edited
https://github.com/llvm/llvm-project/pull/133301
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/nikic requested changes to this pull request.
Missing PR description. The tests also don't make any sense to me, seeing as
they compile down to a constant, unused insertelement.
https://github.com/llvm/llvm-project/pull/133301
___
c
macurtis-amd wrote:
@arsenm Are you okay with the latest revision?
https://github.com/llvm/llvm-project/pull/133301
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
arsenm wrote:
> @arsenm Any recommendations for appeasing the [undef
> deprecator](https://github.com/llvm/llvm-project/pull/133301#issuecomment-2759145421)?
I don't think you did anything other than update existing tests, I would ignore
it for the purposes of this change
https://github.com/
macurtis-amd wrote:
@arsenm Any recommendations for appeasing the [undef
deprecator](https://github.com/llvm/llvm-project/pull/133301#issuecomment-2759145421)?
https://github.com/llvm/llvm-project/pull/133301
___
cfe-commits mailing list
cfe-commits@l
@@ -1011,6 +1011,31 @@ static Value *foldPHINodeOrSelectInst(Instruction &I) {
return foldSelectInst(cast(I));
}
+/// Returns a fixed vector type equivalent to the memory set by II or nullptr
if
+/// unable to do so.
+static FixedVectorType *getVectorTypeFor(const MemSetIns
@@ -0,0 +1,124 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; RUN: opt < %s -passes='sroa' -S | FileCheck %s
+target datalayout =
"e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-n8:16:3
@@ -1011,6 +1011,31 @@ static Value *foldPHINodeOrSelectInst(Instruction &I) {
return foldSelectInst(cast(I));
}
+/// Returns a fixed vector type equivalent to the memory set by II or nullptr
if
+/// unable to do so.
+static FixedVectorType *getVectorTypeFor(const MemSetIns
@@ -0,0 +1,124 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; RUN: opt < %s -passes='sroa' -S | FileCheck %s
+target datalayout =
"e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-n8:16:3
@@ -1011,6 +1011,31 @@ static Value *foldPHINodeOrSelectInst(Instruction &I) {
return foldSelectInst(cast(I));
}
+/// Returns a fixed vector type equivalent to the memory set by II or nullptr
if
+/// unable to do so.
+static FixedVectorType *getVectorTypeFor(const MemSetIns
@@ -1011,6 +1011,31 @@ static Value *foldPHINodeOrSelectInst(Instruction &I) {
return foldSelectInst(cast(I));
}
+/// Returns a fixed vector type equivalent to the memory set by II or nullptr
if
+/// unable to do so.
+static FixedVectorType *getVectorTypeFor(const MemSetIns
@@ -1011,6 +1011,31 @@ static Value *foldPHINodeOrSelectInst(Instruction &I) {
return foldSelectInst(cast(I));
}
+/// Returns a fixed vector type equivalent to the memory set by II or nullptr
if
+/// unable to do so.
+static FixedVectorType *getVectorTypeFor(const MemSetIns
@@ -0,0 +1,124 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; RUN: opt < %s -passes='sroa' -S | FileCheck %s
+target datalayout =
"e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-n8:16:3
@@ -1011,6 +1011,31 @@ static Value *foldPHINodeOrSelectInst(Instruction &I) {
return foldSelectInst(cast(I));
}
+/// Returns a fixed vector type equivalent to the memory set by II or nullptr
if
+/// unable to do so.
+static FixedVectorType *getVectorTypeFor(const MemSetIns
@@ -0,0 +1,124 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; RUN: opt < %s -passes='sroa' -S | FileCheck %s
+target datalayout =
"e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-n8:16:3
@@ -1011,6 +1011,31 @@ static Value *foldPHINodeOrSelectInst(Instruction &I) {
return foldSelectInst(cast(I));
}
+/// Returns a fixed vector type equivalent to the memory set by II or nullptr
if
+/// unable to do so.
+static FixedVectorType *getVectorTypeFor(const MemSetIns
@@ -1170,10 +1191,23 @@ class AllocaSlices::SliceBuilder : public
PtrUseVisitor {
if (!IsOffsetKnown)
return PI.setAborted(&II);
+auto IsSplittable = [&]() {
macurtis-amd wrote:
Cleaned up code removes the helper altogether. Hopefully better no
macurtis-amd wrote:
> Missing new tests? I'd expect to see a few new targeted tests stressing
> different vector sizes and alignments, and not just updates of existing tests
Added a new test.
Thanks for the review!
https://github.com/llvm/llvm-project/pull/133301
_
@@ -2316,12 +2362,15 @@ static VectorType *isVectorPromotionViable(Partition
&P, const DataLayout &DL) {
// Put load and store types into a set for de-duplication.
for (const Slice &S : P) {
-Type *Ty;
+Type *Ty = nullptr;
if (auto *LI = dyn_cast(S.getUse()->
@@ -1170,10 +1191,23 @@ class AllocaSlices::SliceBuilder : public
PtrUseVisitor {
if (!IsOffsetKnown)
return PI.setAborted(&II);
+auto IsSplittable = [&]() {
+ FixedVectorType *VTy = getVectorTypeFor(II, DL);
+ Type *ATy = AS.AI.getAllocatedType();
+
+
@@ -1011,6 +1011,26 @@ static Value *foldPHINodeOrSelectInst(Instruction &I) {
return foldSelectInst(cast(I));
}
+/// Returns a fixed vector type equivalent to the memory set by II or nullptr
if
+/// unable to do so.
+static FixedVectorType *getVectorTypeFor(const MemSetIns
https://github.com/macurtis-amd updated
https://github.com/llvm/llvm-project/pull/133301
>From c0525fd7bd2c740b5b969e8e2913a878792a377c Mon Sep 17 00:00:00 2001
From: Matthew Curtis
Date: Thu, 27 Mar 2025 14:04:40 -0500
Subject: [PATCH 1/3] [SROA] Vector promote some memsets
---
clang/test/Co
https://github.com/macurtis-amd updated
https://github.com/llvm/llvm-project/pull/133301
>From c0525fd7bd2c740b5b969e8e2913a878792a377c Mon Sep 17 00:00:00 2001
From: Matthew Curtis
Date: Thu, 27 Mar 2025 14:04:40 -0500
Subject: [PATCH 1/2] [SROA] Vector promote some memsets
---
clang/test/Co
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: None (macurtis-amd)
Changes
---
Patch is 32.26 KiB, truncated to 20.00 KiB below, full version:
https://github.com/llvm/llvm-project/pull/133301.diff
7 Files Affected:
- (modified) clang/test/CodeGenOpenCL/amdgpu-nullptr.cl (+4-6)
-
https://github.com/macurtis-amd created
https://github.com/llvm/llvm-project/pull/133301
None
>From 096fde6a6eda7ba8d09444a0558f04c3c4531017 Mon Sep 17 00:00:00 2001
From: Matthew Curtis
Date: Thu, 27 Mar 2025 14:04:40 -0500
Subject: [PATCH] [SROA] Vector promote some memsets
---
clang/test/
github-actions[bot] wrote:
:warning: undef deprecator found issues in your code. :warning:
You can test this locally with the following command:
``bash
git diff -U0 --pickaxe-regex -S
'([^a-zA-Z0-9#_-]undef[^a-zA-Z0-9_-]|UndefValue::get)'
08aedf7201e296af532575685372bb5ff7ed8b01
llvmbot wrote:
@llvm/pr-subscribers-backend-amdgpu
Author: None (macurtis-amd)
Changes
---
Patch is 32.26 KiB, truncated to 20.00 KiB below, full version:
https://github.com/llvm/llvm-project/pull/133301.diff
7 Files Affected:
- (modified) clang/test/CodeGenOpenCL/amdgpu-nullptr.cl
32 matches
Mail list logo