https://github.com/fhahn created https://github.com/llvm/llvm-project/pull/99808
Update createEdgeMask to created masks where the terminator in Src is a switch.
We need to handle 2 separate cases:
1. Dst is not the default desintation. Dst is reached if any of the cases with
destination ==
Author: Florian Hahn
Date: 2024-07-19T15:48:50+01:00
New Revision: f9f6f5a9c7748fe485adee206748adf28a849b79
URL:
https://github.com/llvm/llvm-project/commit/f9f6f5a9c7748fe485adee206748adf28a849b79
DIFF:
https://github.com/llvm/llvm-project/commit/f9f6f5a9c7748fe485adee206748adf28a849b79.diff
Author: Florian Hahn
Date: 2024-07-19T14:51:27+01:00
New Revision: 47c08fb8d79ec1bf85cc542be6ca2591ebf2d361
URL:
https://github.com/llvm/llvm-project/commit/47c08fb8d79ec1bf85cc542be6ca2591ebf2d361
DIFF:
https://github.com/llvm/llvm-project/commit/47c08fb8d79ec1bf85cc542be6ca2591ebf2d361.diff
https://github.com/fhahn closed https://github.com/llvm/llvm-project/pull/76612
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -233,6 +233,7 @@ ENUM_CODEGENOPT(StructReturnConvention,
StructReturnConventionKind, 2, SRCK_Defa
CODEGENOPT(RelaxAll , 1, 0) ///< Relax all machine code instructions.
CODEGENOPT(RelaxedAliasing , 1, 0) ///< Set when -fno-strict-aliasing is
enabled.
@@ -392,6 +392,10 @@ Non-comprehensive list of changes in this release
- ``#pragma GCC diagnostic warning "-Wfoo"`` can now downgrade ``-Werror=foo``
errors and certain default-to-error ``-W`` diagnostics to warnings.
+- Clang now emits distinct type-based alias analysis
https://github.com/fhahn commented:
> First of all I want to say that this is a really cool project, especially the
> type sanitizer part. Thanks for working on this!
>
> > Just updated the tysan branches again. Unfortunately we aren't yet at a
> > point where LLVM is `tysan` clean, there is
https://github.com/fhahn edited https://github.com/llvm/llvm-project/pull/76612
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
fhahn wrote:
It looks like there's still a failure related to this patch on current main
AFAICT (MSAN finds a use of uninitialized value):
https://lab.llvm.org/buildbot/#/builders/169/builds/852/steps/12/logs/stdio
```
FAIL: Clang :: CodeGen/arm-branch-protection-attr-1.c (3 of 83868)
fhahn wrote:
Would it be possible to add a test case? Could you add a bit more detail how
different mange contexts cause crashes in TBAA?
https://github.com/llvm/llvm-project/pull/98138
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://github.com/fhahn approved this pull request.
LGTM, thanks!
https://github.com/llvm/llvm-project/pull/98026
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/fhahn commented:
> Changes generally LGTM though I think this should come with a release note so
> users know about the new command line options and functionality?
Thanks, I tried to add release note entries for the new behavior + the new
flags. Hope I added them in the
https://github.com/fhahn edited https://github.com/llvm/llvm-project/pull/76612
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -185,10 +185,56 @@ llvm::MDNode *CodeGenTBAA::getTypeInfoHelper(const Type
*Ty) {
return getChar();
// Handle pointers and references.
- // TODO: Implement C++'s type "similarity" and consider dis-"similar"
- // pointers distinct.
- if (Ty->isPointerType() ||
https://github.com/fhahn commented:
Running IPSCCP twice seems like quite a heavy hammer, I'd expect a noticeable
compile-time impact.
I'd recommend to try to extract a reproducer from your motivating use case and
check why IPSCCP cannot perform the desired optimization before inlining. Note
@@ -185,10 +185,33 @@ llvm::MDNode *CodeGenTBAA::getTypeInfoHelper(const Type
*Ty) {
return getChar();
// Handle pointers and references.
- // TODO: Implement C++'s type "similarity" and consider dis-"similar"
- // pointers distinct.
- if (Ty->isPointerType() ||
@@ -185,10 +185,33 @@ llvm::MDNode *CodeGenTBAA::getTypeInfoHelper(const Type
*Ty) {
return getChar();
// Handle pointers and references.
fhahn wrote:
Added, thank you very much!
https://github.com/llvm/llvm-project/pull/76612
fhahn wrote:
Rebased, updated and added option to disable this (`-fno-pointer-tbaa`). I
think this would be ready for a review now :)
https://github.com/llvm/llvm-project/pull/76612
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
fhahn wrote:
Thanks, I'll hope to get back to this and make the suggested adjustments soonish
https://github.com/llvm/llvm-project/pull/95004
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/76612
>From 61c94b87858e51748a9664acab51ca4c964265a4 Mon Sep 17 00:00:00 2001
From: Florian Hahn
Date: Sat, 30 Dec 2023 10:39:58 +
Subject: [PATCH] [TBAA] Emit distinct TBAA tags for pointers with different
https://github.com/fhahn edited https://github.com/llvm/llvm-project/pull/95004
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/fhahn created https://github.com/llvm/llvm-project/pull/95004
This adds an attribute version of -fpass-by-value-is-noalias (added in
a874d63344)
Still needs proper docs.
>From 34e880a20b0b36218a1307e52ccb71092bfd64f7 Mon Sep 17 00:00:00 2001
From: Florian Hahn
Date: Mon,
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/93281
>From f5872e7c82d097ae3c141765d3f1d7e3d0b25b82 Mon Sep 17 00:00:00 2001
From: PeterChou1
Date: Fri, 24 May 2024 04:28:08 -0400
Subject: [PATCH 1/2] clang-doc switched from using relative to absolute paths
---
fhahn wrote:
Shouldn't this be added to the LTO code generator? In `libLTO` (used by Apple's
linker) it is added here `llvm/lib/LTO/ThinLTOCodeGenerator.cpp`
https://github.com/llvm/llvm-project/pull/92331
___
cfe-commits mailing list
Author: Florian Hahn
Date: 2024-05-15T15:49:03+01:00
New Revision: 8a4cbeada930bf11fe740a2038bd5a3230712284
URL:
https://github.com/llvm/llvm-project/commit/8a4cbeada930bf11fe740a2038bd5a3230712284
DIFF:
https://github.com/llvm/llvm-project/commit/8a4cbeada930bf11fe740a2038bd5a3230712284.diff
fhahn wrote:
This breaks building on some platforms. Should be fixed with
da116bd82c0a78d2022c34b56e45cf6e4f91eaed
https://github.com/llvm/llvm-project/pull/90338
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
Author: Florian Hahn
Date: 2024-05-15T15:37:52+01:00
New Revision: da116bd82c0a78d2022c34b56e45cf6e4f91eaed
URL:
https://github.com/llvm/llvm-project/commit/da116bd82c0a78d2022c34b56e45cf6e4f91eaed
DIFF:
https://github.com/llvm/llvm-project/commit/da116bd82c0a78d2022c34b56e45cf6e4f91eaed.diff
@@ -0,0 +1,116 @@
+; RUN: opt < %s -passes='print' -debug-only=loop-accesses
-disable-output 2>&1 | FileCheck %s
fhahn wrote:
Please also check the `access-info` report.
https://github.com/llvm/llvm-project/pull/78432
@@ -0,0 +1,116 @@
+; RUN: opt < %s -passes='print' -debug-only=loop-accesses
-disable-output 2>&1 | FileCheck %s
+
+; REQUIRES: asserts
+
+
+define void @frexp_f64(ptr %in, ptr %out1, ptr %out2, i32 %N) {
+; CHECK: LAA: Allow to vectorize math function with write-only attribute:
@@ -0,0 +1,116 @@
+; RUN: opt < %s -passes='print' -debug-only=loop-accesses
-disable-output 2>&1 | FileCheck %s
+
+; REQUIRES: asserts
+
+
+define void @frexp_f64(ptr %in, ptr %out1, ptr %out2, i32 %N) {
+; CHECK: LAA: Allow to vectorize math function with write-only attribute:
@@ -2477,6 +2493,15 @@ void LoopAccessInfo::analyzeLoop(AAResults *AA, LoopInfo
*LI,
// Save 'store' instructions. Abort if other instructions write to
memory.
if (I.mayWriteToMemory()) {
+// We can safety handle math functions that have vectorized
+
@@ -0,0 +1,116 @@
+; RUN: opt < %s -passes='print' -debug-only=loop-accesses
-disable-output 2>&1 | FileCheck %s
+
+; REQUIRES: asserts
+
+
+define void @frexp_f64(ptr %in, ptr %out1, ptr %out2, i32 %N) {
+; CHECK: LAA: Allow to vectorize math function with write-only attribute:
@@ -2477,6 +2493,15 @@ void LoopAccessInfo::analyzeLoop(AAResults *AA, LoopInfo
*LI,
// Save 'store' instructions. Abort if other instructions write to
memory.
if (I.mayWriteToMemory()) {
+// We can safety handle math functions that have vectorized
@@ -2477,6 +2493,15 @@ void LoopAccessInfo::analyzeLoop(AAResults *AA, LoopInfo
*LI,
// Save 'store' instructions. Abort if other instructions write to
memory.
fhahn wrote:
comment out of date
https://github.com/llvm/llvm-project/pull/78432
https://github.com/fhahn edited https://github.com/llvm/llvm-project/pull/78432
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/fhahn requested changes to this pull request.
https://github.com/llvm/llvm-project/pull/78432
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/90702
>From 4c312af7af5d0e419269c5b2304b0f898363bb85 Mon Sep 17 00:00:00 2001
From: Doug Wyatt
Date: Tue, 30 Apr 2024 21:43:16 -0700
Subject: [PATCH 1/5] In AArch64's DataLayout, specify a minimum function
alignment of
https://github.com/fhahn approved this pull request.
LGTM, thanks!
https://github.com/llvm/llvm-project/pull/90702
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1480,11 +1480,11 @@ AArch64leTargetInfo::AArch64leTargetInfo(const
llvm::Triple ,
void AArch64leTargetInfo::setDataLayout() {
if (getTriple().isOSBinFormatMachO()) {
if(getTriple().isArch32Bit())
- resetDataLayout("e-m:o-p:32:32-i64:64-i128:128-n32:64-S128",
@@ -0,0 +1,117 @@
+; RUN: opt < %s -mattr=+sve -vector-library=ArmPL
-passes=inject-tli-mappings,loop-vectorize -debug-only=loop-accesses
-disable-output 2>&1 | FileCheck %s
+
+; REQUIRES: asserts
+
+target triple = "aarch64-unknown-linux-gnu"
+
+; TODO: add mappings for
@@ -1444,7 +1444,7 @@ struct PragmaWarningHandler : public PragmaHandler {
.Case("once", PPCallbacks::PWS_Once)
.Case("suppress", PPCallbacks::PWS_Suppress)
.Default(-1);
-
fhahn wrote:
Is it possible that this broke this bot failing with the error below?
```
usr/local/clang-17.0.2/bin/clang++ -DGTEST_HAS_RTTI=0 -D_CINDEX_LIB_ -D_DEBUG
-D_GLIBCXX_ASSERTIONS -D_LARGE_FILE_API -D__STDC_CONSTANT_MACROS
-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
Author: Florian Hahn
Date: 2024-04-06T14:56:35+01:00
New Revision: 1803d675004bb512051d2df7e1ae3ea95692fc67
URL:
https://github.com/llvm/llvm-project/commit/1803d675004bb512051d2df7e1ae3ea95692fc67
DIFF:
https://github.com/llvm/llvm-project/commit/1803d675004bb512051d2df7e1ae3ea95692fc67.diff
https://github.com/fhahn closed https://github.com/llvm/llvm-project/pull/87753
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/fhahn approved this pull request.
LGTM, thanks!
https://github.com/llvm/llvm-project/pull/87753
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/84569
>From 99ca952b60344d2ff683d05d8baa423aa11da83a Mon Sep 17 00:00:00 2001
From: Alex Crichton
Date: Fri, 8 Mar 2024 13:36:18 -0800
Subject: [PATCH 1/2] [WebAssembly] Change the default linker for
`wasm32-wasip2`
https://github.com/fhahn closed https://github.com/llvm/llvm-project/pull/84370
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
fhahn wrote:
> Do you have a testcase that shows how this goes wrong without this change ?
I am not 100% if the type-based aliasing rules allow aliasing a union access
containing a float and a plain pointer to float, but I am thinking about
something like the below, where we remove the first
fhahn wrote:
ping :) (apologies for early ping, but I'd like to bump this as this is a
potential mis-compile I think(
https://github.com/llvm/llvm-project/pull/84370
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://github.com/fhahn closed https://github.com/llvm/llvm-project/pull/84386
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/fhahn created https://github.com/llvm/llvm-project/pull/84386
Without this bail out, we may generate fields with null nodes as tags are
generated by using getTypeInfo which has the same bail out.
>From 36144a7b2a84b10711904c1a568bf02554f83296 Mon Sep 17 00:00:00 2001
From:
Author: Florian Hahn
Date: 2024-03-07T21:40:23Z
New Revision: 167b90d0401d0fe488195c7e3d6fc1edc8fc5d94
URL:
https://github.com/llvm/llvm-project/commit/167b90d0401d0fe488195c7e3d6fc1edc8fc5d94
DIFF:
https://github.com/llvm/llvm-project/commit/167b90d0401d0fe488195c7e3d6fc1edc8fc5d94.diff
LOG:
https://github.com/fhahn created https://github.com/llvm/llvm-project/pull/84370
At the moment,distinct fields for each union member are generated. When copying
a union, we don't know which union member is active, so there's no benefit from
recording the different fields. It can result in
Author: Florian Hahn
Date: 2024-03-07T18:57:09Z
New Revision: 6f299417769ade1635c91f974a8745e237cc9adf
URL:
https://github.com/llvm/llvm-project/commit/6f299417769ade1635c91f974a8745e237cc9adf
DIFF:
https://github.com/llvm/llvm-project/commit/6f299417769ade1635c91f974a8745e237cc9adf.diff
LOG:
fhahn wrote:
Thanks!
https://github.com/llvm/llvm-project/pull/82922
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/fhahn closed https://github.com/llvm/llvm-project/pull/82922
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
fhahn wrote:
> Whitespace is weird in a few places; otherwise looks fine.
Argh yes, should be fixed in the latest version. Still need to figure out how
to make sure all changes are formatted once the branch contains merges (before
the format checker complains and shows the commits)
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/82922
>From 556fcefed9645aa0a0a965ff8f22d8accdf9eefc Mon Sep 17 00:00:00 2001
From: Florian Hahn
Date: Sun, 25 Feb 2024 13:23:17 +
Subject: [PATCH 1/7] [TBAA] Skip all bitfields when generating !tbaa.struct
@@ -294,18 +297,49 @@ CodeGenTBAA::CollectFields(uint64_t BaseOffset,
return false;
const ASTRecordLayout = Context.getASTRecordLayout(RD);
+const CGRecordLayout = CGTypes.getCGRecordLayout(RD);
unsigned idx = 0;
-for (RecordDecl::field_iterator i
@@ -294,18 +297,49 @@ CodeGenTBAA::CollectFields(uint64_t BaseOffset,
return false;
const ASTRecordLayout = Context.getASTRecordLayout(RD);
+const CGRecordLayout = CGTypes.getCGRecordLayout(RD);
unsigned idx = 0;
-for (RecordDecl::field_iterator i
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/82922
>From 556fcefed9645aa0a0a965ff8f22d8accdf9eefc Mon Sep 17 00:00:00 2001
From: Florian Hahn
Date: Sun, 25 Feb 2024 13:23:17 +
Subject: [PATCH 1/6] [TBAA] Skip all bitfields when generating !tbaa.struct
Author: Florian Hahn
Date: 2024-02-26T22:50:50Z
New Revision: 54cff50791dec977feb0badb74919d97dff5b859
URL:
https://github.com/llvm/llvm-project/commit/54cff50791dec977feb0badb74919d97dff5b859
DIFF:
https://github.com/llvm/llvm-project/commit/54cff50791dec977feb0badb74919d97dff5b859.diff
LOG:
fhahn wrote:
> This seems like it messes up the metadata in a different way: we have no
> representation of the bitfield at all, so it looks like it's padding.
>
> I think we want to treat multiple adjacent bitfields as a single "field". So
> NamedBitfields from the testcase would have three
https://github.com/fhahn edited https://github.com/llvm/llvm-project/pull/82922
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/fhahn edited https://github.com/llvm/llvm-project/pull/82922
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/82922
>From 556fcefed9645aa0a0a965ff8f22d8accdf9eefc Mon Sep 17 00:00:00 2001
From: Florian Hahn
Date: Sun, 25 Feb 2024 13:23:17 +
Subject: [PATCH 1/5] [TBAA] Skip all bitfields when generating !tbaa.struct
Author: Florian Hahn
Date: 2024-02-26T12:36:00Z
New Revision: f290c000d87bfc72a31b151dffa2d190596ebe91
URL:
https://github.com/llvm/llvm-project/commit/f290c000d87bfc72a31b151dffa2d190596ebe91
DIFF:
https://github.com/llvm/llvm-project/commit/f290c000d87bfc72a31b151dffa2d190596ebe91.diff
LOG:
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/82922
>From 556fcefed9645aa0a0a965ff8f22d8accdf9eefc Mon Sep 17 00:00:00 2001
From: Florian Hahn
Date: Sun, 25 Feb 2024 13:23:17 +
Subject: [PATCH 1/2] [TBAA] Skip all bitfields when generating !tbaa.struct
https://github.com/fhahn created https://github.com/llvm/llvm-project/pull/82922
At the moment, clang generates what I believe are incorrect !tbaa.struct fields
for named bitfields. At the moment, the base type size is used for named
bifields (e.g. sizeof(int)) instead of the bifield width per
Author: Florian Hahn
Date: 2024-02-25T13:17:08Z
New Revision: 711014714716753f791291ed6a152e00899469a3
URL:
https://github.com/llvm/llvm-project/commit/711014714716753f791291ed6a152e00899469a3
DIFF:
https://github.com/llvm/llvm-project/commit/711014714716753f791291ed6a152e00899469a3.diff
LOG:
https://github.com/fhahn closed https://github.com/llvm/llvm-project/pull/81289
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/81289
>From e6de9f21b162c57dd09cb4de3147b7ab09ef8681 Mon Sep 17 00:00:00 2001
From: Florian Hahn
Date: Fri, 9 Feb 2024 13:29:19 +
Subject: [PATCH 1/5] [TBAA] Extract logic to use TBAA tag for field of
!tbaa.struct
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/80271
>From f4dabdfaa66744ecfca4c0a57472a357db9715d9 Mon Sep 17 00:00:00 2001
From: Florian Hahn
Date: Wed, 31 Jan 2024 14:02:38 +
Subject: [PATCH 1/3] [VPlan] Update VPInst::onlyFirstLaneUsed to check users.
A
https://github.com/fhahn closed https://github.com/llvm/llvm-project/pull/72647
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/72647
>From 3dfe86782806f048b130d46afa6293712919f672 Mon Sep 17 00:00:00 2001
From: Florian Hahn
Date: Fri, 14 Apr 2023 14:33:57 +0100
Subject: [PATCH 1/2] [Matrix] Convert column-vector ops feeding dot product to
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/72647
>From 3dfe86782806f048b130d46afa6293712919f672 Mon Sep 17 00:00:00 2001
From: Florian Hahn
Date: Fri, 14 Apr 2023 14:33:57 +0100
Subject: [PATCH 1/2] [Matrix] Convert column-vector ops feeding dot product to
@@ -453,16 +453,17 @@ Value
*VPInstruction::generateInstruction(VPTransformState ,
else if (RecurrenceDescriptor::isAnyOfRecurrenceKind(RK)) {
TrackingVH ReductionStartValue =
RdxDesc.getRecurrenceStartValue();
- ReducedPartRdx =
@@ -9110,6 +9111,41 @@ void
LoopVectorizationPlanner::adjustRecipesForReductions(
continue;
const RecurrenceDescriptor = PhiR->getRecurrenceDescriptor();
+// Adjust AnyOf reductions; replace the reduction phi for the selected
value
fhahn
@@ -9142,7 +9178,9 @@ void LoopVectorizationPlanner::adjustRecipesForReductions(
// then extend the loop exit value to enable InstCombine to evaluate the
// entire expression in the smaller type.
Type *PhiTy = PhiR->getStartValue()->getLiveInIRValue()->getType();
-
@@ -9110,6 +9111,41 @@ void
LoopVectorizationPlanner::adjustRecipesForReductions(
continue;
const RecurrenceDescriptor = PhiR->getRecurrenceDescriptor();
+// Adjust AnyOf reductions; replace the reduction phi for the selected
value
+// with a boolean
@@ -1079,16 +1070,13 @@ Value *llvm::createAnyOfTargetReduction(IRBuilderBase
, Value *Src,
NewVal = SI->getTrueValue();
}
- // Create a splat vector with the new value and compare this to the vector
- // we want to reduce.
- ElementCount EC =
@@ -9110,6 +9111,41 @@ void
LoopVectorizationPlanner::adjustRecipesForReductions(
continue;
const RecurrenceDescriptor = PhiR->getRecurrenceDescriptor();
+// Adjust AnyOf reductions; replace the reduction phi for the selected
value
+// with a boolean
@@ -452,16 +452,17 @@ Value
*VPInstruction::generateInstruction(VPTransformState ,
else if (RecurrenceDescriptor::isAnyOfRecurrenceKind(RK)) {
TrackingVH ReductionStartValue =
RdxDesc.getRecurrenceStartValue();
fhahn wrote:
@@ -453,16 +453,17 @@ Value
*VPInstruction::generateInstruction(VPTransformState ,
else if (RecurrenceDescriptor::isAnyOfRecurrenceKind(RK)) {
TrackingVH ReductionStartValue =
RdxDesc.getRecurrenceStartValue();
- ReducedPartRdx =
@@ -9110,6 +9111,41 @@ void
LoopVectorizationPlanner::adjustRecipesForReductions(
continue;
const RecurrenceDescriptor = PhiR->getRecurrenceDescriptor();
+// Adjust AnyOf reductions; replace the reduction phi for the selected
value
+// with a boolean
@@ -7486,7 +7486,8 @@ static void createAndCollectMergePhiForReduction(
auto *PhiR = cast(RedResult->getOperand(0));
const RecurrenceDescriptor = PhiR->getRecurrenceDescriptor();
- TrackingVH ReductionStartValue = RdxDesc.getRecurrenceStartValue();
+ TrackingVH
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/78304
>From 9846f970b6b394ccc3af25b92f238377a8ae7807 Mon Sep 17 00:00:00 2001
From: Florian Hahn
Date: Sun, 14 Jan 2024 18:06:36 +
Subject: [PATCH 1/2] [LV] Improve AnyOf reduction codegen.
Update AnyOf reduction
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/80271
>From f4dabdfaa66744ecfca4c0a57472a357db9715d9 Mon Sep 17 00:00:00 2001
From: Florian Hahn
Date: Wed, 31 Jan 2024 14:02:38 +
Subject: [PATCH 1/3] [VPlan] Update VPInst::onlyFirstLaneUsed to check users.
A
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/80271
>From f4dabdfaa66744ecfca4c0a57472a357db9715d9 Mon Sep 17 00:00:00 2001
From: Florian Hahn
Date: Wed, 31 Jan 2024 14:02:38 +
Subject: [PATCH 1/2] [VPlan] Update VPInst::onlyFirstLaneUsed to check users.
A
https://github.com/fhahn closed https://github.com/llvm/llvm-project/pull/80269
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
fhahn wrote:
> The only observable changes to existing tests involve cse'ing IV steps from
> replicate regions when unrolling w/o vectorizing, iinm. Is there some other
> scenario worth testing?
I wasn't able to come up with a different test with vectorizing.
https://github.com/fhahn edited https://github.com/llvm/llvm-project/pull/80269
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1397,9 +1397,9 @@ void VPSlotTracker::assignSlots(const VPBasicBlock *VPBB)
{
assignSlot(Def);
}
-bool vputils::onlyFirstLaneUsed(VPValue *Def) {
+bool vputils::onlyFirstLaneUsed(const VPValue *Def) {
return all_of(Def->users(),
-[Def](VPUser *U)
@@ -1397,9 +1397,9 @@ void VPSlotTracker::assignSlots(const VPBasicBlock *VPBB)
{
assignSlot(Def);
}
-bool vputils::onlyFirstLaneUsed(VPValue *Def) {
+bool vputils::onlyFirstLaneUsed(const VPValue *Def) {
return all_of(Def->users(),
-[Def](VPUser *U)
@@ -1256,23 +1256,7 @@ class VPInstruction : public VPRecipeWithIRFlags {
}
}
fhahn wrote:
Added back, thanks!
https://github.com/llvm/llvm-project/pull/80269
___
cfe-commits mailing list
@@ -515,6 +515,24 @@ void VPInstruction::execute(VPTransformState ) {
State.set(this, GeneratedValue, Part);
}
}
+bool VPInstruction::onlyFirstLaneUsed(const VPValue *Op) const {
+ assert(is_contained(operands(), Op) && "Op must be an operand of the
recipe");
+ if
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/80269
>From f4dabdfaa66744ecfca4c0a57472a357db9715d9 Mon Sep 17 00:00:00 2001
From: Florian Hahn
Date: Wed, 31 Jan 2024 14:02:38 +
Subject: [PATCH 1/2] [VPlan] Update VPInst::onlyFirstLaneUsed to check users.
A
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/80269
>From f4dabdfaa66744ecfca4c0a57472a357db9715d9 Mon Sep 17 00:00:00 2001
From: Florian Hahn
Date: Wed, 31 Jan 2024 14:02:38 +
Subject: [PATCH] [VPlan] Update VPInst::onlyFirstLaneUsed to check users.
A
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/80269
>From f4dabdfaa66744ecfca4c0a57472a357db9715d9 Mon Sep 17 00:00:00 2001
From: Florian Hahn
Date: Wed, 31 Jan 2024 14:02:38 +
Subject: [PATCH] [VPlan] Update VPInst::onlyFirstLaneUsed to check users.
A
@@ -6987,6 +7024,17 @@ class BoUpSLP::ShuffleCostEstimator : public
BaseShuffleAnalysis {
auto *VecTy = FixedVectorType::get(VL.front()->getType(), VL.size());
InstructionCost GatherCost = 0;
SmallVector Gathers(VL.begin(), VL.end());
+auto ComputeGatherCost =
1 - 100 of 441 matches
Mail list logo