[lld] [clang-tools-extra] [libcxx] [flang] [clang] [libc] [lldb] [compiler-rt] [llvm] [VPlan] Implement cloning of VPlans. (PR #73158)

2024-01-27 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/73158 >From 13a26e8e7440c3b501730b22588af393a3e543cd Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Thu, 6 Jul 2023 08:07:45 +0100 Subject: [PATCH 1/4] [VPlan] Implement cloning of VPlans. This patch implements clonin

[lld] [clang-tools-extra] [libcxx] [flang] [clang] [libc] [lldb] [compiler-rt] [llvm] [VPlan] Implement cloning of VPlans. (PR #73158)

2024-01-27 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/73158 >From 13a26e8e7440c3b501730b22588af393a3e543cd Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Thu, 6 Jul 2023 08:07:45 +0100 Subject: [PATCH 1/5] [VPlan] Implement cloning of VPlans. This patch implements clonin

[libc] [compiler-rt] [llvm] [lldb] [flang] [clang-tools-extra] [lld] [libcxx] [clang] [VPlan] Implement cloning of VPlans. (PR #73158)

2024-01-27 Thread Florian Hahn via cfe-commits
https://github.com/fhahn closed https://github.com/llvm/llvm-project/pull/73158 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[flang] [clang] [llvm] [compiler-rt] [clang-tools-extra] [VPlan] Replace VPRecipeOrVPValue with VP2VP recipe simplification. (PR #76090)

2024-01-28 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/76090 >From 7c31c8bc2acf60bd50cb6d63944ee8d4946b9638 Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Thu, 4 May 2023 21:33:24 +0100 Subject: [PATCH 1/3] [VPlan] Replace VPRecieOrVPValue with VP2VP recipe simplification

[llvm] [libcxx] [lldb] [compiler-rt] [flang] [libc] [clang] [lld] [clang-tools-extra] [VPlan] Implement cloning of VPlans. (PR #73158)

2024-01-28 Thread Florian Hahn via cfe-commits
fhahn wrote: @Enna1 thanks, should be fixed by 1b37e8087e1e1ecf5aadd8da536ee17dc21832e2. Bot should be back to green https://github.com/llvm/llvm-project/pull/73158 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin

[llvm] [flang] [compiler-rt] [clang-tools-extra] [clang] [VPlan] Replace VPRecipeOrVPValue with VP2VP recipe simplification. (PR #76090)

2024-01-28 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/76090 >From 7c31c8bc2acf60bd50cb6d63944ee8d4946b9638 Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Thu, 4 May 2023 21:33:24 +0100 Subject: [PATCH 1/4] [VPlan] Replace VPRecieOrVPValue with VP2VP recipe simplification

[llvm] [clang-tools-extra] [compiler-rt] [clang] [flang] [VPlan] Replace VPRecipeOrVPValue with VP2VP recipe simplification. (PR #76090)

2024-01-28 Thread Florian Hahn via cfe-commits
@@ -8378,9 +8357,8 @@ void VPRecipeBuilder::fixHeaderPhis() { } } -VPRecipeOrVPValueTy VPRecipeBuilder::handleReplication(Instruction *I, - VFRange &Range, - VPlan &Pl

[llvm] [flang] [compiler-rt] [clang-tools-extra] [clang] [VPlan] Replace VPRecipeOrVPValue with VP2VP recipe simplification. (PR #76090)

2024-01-28 Thread Florian Hahn via cfe-commits
@@ -8999,6 +8963,18 @@ void LoopVectorizationPlanner::adjustRecipesForReductions( LinkVPBB->insert(FMulRecipe, CurrentLink->getIterator()); VecOp = FMulRecipe; } else { +auto *Blend = dyn_cast(CurrentLink); fhahn wrote: Done, tha

[clang-tools-extra] [compiler-rt] [flang] [clang] [llvm] [VPlan] Replace VPRecipeOrVPValue with VP2VP recipe simplification. (PR #76090)

2024-01-28 Thread Florian Hahn via cfe-commits
@@ -806,6 +806,19 @@ static unsigned getOpcodeForRecipe(VPRecipeBase &R) { /// Try to simplify recipe \p R. static void simplifyRecipe(VPRecipeBase &R, VPTypeAnalysis &TypeInfo) { + // Try to remove redundant blend recipes. + if (auto *Blend = dyn_cast(&R)) { +bool AllEq

[clang] [llvm] [clang-tools-extra] [flang] [compiler-rt] [VPlan] Replace VPRecipeOrVPValue with VP2VP recipe simplification. (PR #76090)

2024-01-28 Thread Florian Hahn via cfe-commits
@@ -8999,6 +8963,18 @@ void LoopVectorizationPlanner::adjustRecipesForReductions( LinkVPBB->insert(FMulRecipe, CurrentLink->getIterator()); VecOp = FMulRecipe; } else { +auto *Blend = dyn_cast(CurrentLink); +if (PhiR->isInLoop() && Blend)

[llvm] [flang] [compiler-rt] [clang] [clang-tools-extra] [VPlan] Replace VPRecipeOrVPValue with VP2VP recipe simplification. (PR #76090)

2024-01-28 Thread Florian Hahn via cfe-commits
@@ -8999,6 +8963,18 @@ void LoopVectorizationPlanner::adjustRecipesForReductions( LinkVPBB->insert(FMulRecipe, CurrentLink->getIterator()); VecOp = FMulRecipe; } else { +auto *Blend = dyn_cast(CurrentLink); +if (PhiR->isInLoop() && Blend)

[flang] [clang-tools-extra] [llvm] [clang] [compiler-rt] [VPlan] Replace VPRecipeOrVPValue with VP2VP recipe simplification. (PR #76090)

2024-01-28 Thread Florian Hahn via cfe-commits
@@ -116,12 +111,11 @@ class VPRecipeBuilder { /// Check if an existing VPValue can be used for \p Instr or a recipe can be /// create for \p I withing the given VF \p Range. If an existing VPValue can fhahn wrote: Updated, thanks! https://github.com/llvm

[clang] [compiler-rt] [clang-tools-extra] [llvm] [flang] [VPlan] Replace VPRecipeOrVPValue with VP2VP recipe simplification. (PR #76090)

2024-01-28 Thread Florian Hahn via cfe-commits
@@ -88,8 +86,8 @@ class VPRecipeBuilder { /// or a new VPBlendRecipe otherwise. Currently all such phi nodes are turned fhahn wrote: Updated, thanks! https://github.com/llvm/llvm-project/pull/76090 ___ cfe-commits m

[clang] [compiler-rt] [clang-tools-extra] [flang] [llvm] [VPlan] Replace VPRecipeOrVPValue with VP2VP recipe simplification. (PR #76090)

2024-01-28 Thread Florian Hahn via cfe-commits
@@ -8292,13 +8271,13 @@ VPRecipeOrVPValueTy VPRecipeBuilder::tryToBlend(PHINode *Phi, for (unsigned In = 0; In < NumIncoming; In++) { VPValue *EdgeMask = createEdgeMask(Phi->getIncomingBlock(In), Phi->getParent(), *Plan); -assert((EdgeMask || NumIncoming == 1

[clang] [clang-tools-extra] [llvm] [LV] Improve AnyOf reduction codegen. (PR #78304)

2024-01-28 Thread Florian Hahn via cfe-commits
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] [LV] Improve AnyOf reduction codegen. Update AnyOf reduction code ge

[clang] [flang] [libcxx] [compiler-rt] [libc] [llvm] [clang-tools-extra] [mlir] [VPlan] Replace VPRecipeOrVPValue with VP2VP recipe simplification. (PR #76090)

2024-01-29 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/76090 >From 7c31c8bc2acf60bd50cb6d63944ee8d4946b9638 Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Thu, 4 May 2023 21:33:24 +0100 Subject: [PATCH 1/4] [VPlan] Replace VPRecieOrVPValue with VP2VP recipe simplification

[libcxx] [compiler-rt] [clang-tools-extra] [flang] [mlir] [clang] [libc] [llvm] [VPlan] Replace VPRecipeOrVPValue with VP2VP recipe simplification. (PR #76090)

2024-01-29 Thread Florian Hahn via cfe-commits
@@ -9027,7 +8994,8 @@ void LoopVectorizationPlanner::adjustRecipesForReductions( // the phi until LoopExitValue. We keep track of the previous item // (PreviousLink) to tell which of the two operands of a Link will remain // scalar and which will be reduced. For min

[clang-tools-extra] [flang] [libc] [compiler-rt] [libcxx] [clang] [llvm] [mlir] [VPlan] Replace VPRecipeOrVPValue with VP2VP recipe simplification. (PR #76090)

2024-01-29 Thread Florian Hahn via cfe-commits
@@ -9058,6 +9026,20 @@ void LoopVectorizationPlanner::adjustRecipesForReductions( LinkVPBB->insert(FMulRecipe, CurrentLink->getIterator()); VecOp = FMulRecipe; } else { +auto *Blend = dyn_cast(CurrentLink); +if (PhiR->isInLoop() && Blend)

[clang-tools-extra] [mlir] [libcxx] [compiler-rt] [clang] [llvm] [libc] [flang] [VPlan] Replace VPRecipeOrVPValue with VP2VP recipe simplification. (PR #76090)

2024-01-29 Thread Florian Hahn via cfe-commits
@@ -827,6 +827,16 @@ static unsigned getOpcodeForRecipe(VPRecipeBase &R) { /// Try to simplify recipe \p R. static void simplifyRecipe(VPRecipeBase &R, VPTypeAnalysis &TypeInfo) { + // Try to remove redundant blend recipes. + if (auto *Blend = dyn_cast(&R)) { ---

[clang-tools-extra] [flang] [libc] [compiler-rt] [libcxx] [clang] [llvm] [mlir] [VPlan] Replace VPRecipeOrVPValue with VP2VP recipe simplification. (PR #76090)

2024-01-29 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/76090 >From 7c31c8bc2acf60bd50cb6d63944ee8d4946b9638 Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Thu, 4 May 2023 21:33:24 +0100 Subject: [PATCH 1/5] [VPlan] Replace VPRecieOrVPValue with VP2VP recipe simplification

[libcxx] [compiler-rt] [clang-tools-extra] [flang] [mlir] [clang] [libc] [llvm] [VPlan] Replace VPRecipeOrVPValue with VP2VP recipe simplification. (PR #76090)

2024-01-29 Thread Florian Hahn via cfe-commits
https://github.com/fhahn closed https://github.com/llvm/llvm-project/pull/76090 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libcxx] [clang-tools-extra] [flang] [mlir] [clang] [llvm] [LV] Improve AnyOf reduction codegen. (PR #78304)

2024-01-29 Thread Florian Hahn via cfe-commits
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] [LV] Improve AnyOf reduction codegen. Update AnyOf reduction code ge

[llvm] [flang] [clang-tools-extra] [mlir] [libcxx] [clang] [LV] Improve AnyOf reduction codegen. (PR #78304)

2024-01-29 Thread Florian Hahn via cfe-commits
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 cod

[libcxx] [llvm] [lld] [openmp] [clang] [lto] Add minimum macos sdk requirement to test (PR #77695)

2024-01-29 Thread Florian Hahn via cfe-commits
fhahn wrote: Thanks for confirming! https://github.com/llvm/llvm-project/pull/77695 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[flang] [mlir] [libcxxabi] [clang] [clang-tools-extra] [libc] [libcxx] [llvm] [openmp] [compiler-rt] [AArch64] Add custom lowering for load <3 x i8>. (PR #78632)

2024-01-30 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/78632 >From a786cdedc2c9a9898cd0b80d84f5b11aace5da1c Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Tue, 28 Nov 2023 15:44:02 + Subject: [PATCH 1/7] [AArch64] Add custom lowering for load <3 x i8>. Add custom comb

[libc] [mlir] [flang] [clang] [openmp] [clang-tools-extra] [libcxxabi] [libcxx] [compiler-rt] [llvm] [AArch64] Add custom lowering for load <3 x i8>. (PR #78632)

2024-01-30 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/78632 >From a786cdedc2c9a9898cd0b80d84f5b11aace5da1c Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Tue, 28 Nov 2023 15:44:02 + Subject: [PATCH 1/9] [AArch64] Add custom lowering for load <3 x i8>. Add custom comb

[libc] [mlir] [flang] [clang] [openmp] [clang-tools-extra] [libcxxabi] [libcxx] [compiler-rt] [llvm] [AArch64] Add custom lowering for load <3 x i8>. (PR #78632)

2024-01-30 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/78632 >From a786cdedc2c9a9898cd0b80d84f5b11aace5da1c Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Tue, 28 Nov 2023 15:44:02 + Subject: [PATCH 01/10] [AArch64] Add custom lowering for load <3 x i8>. Add custom co

[libc] [mlir] [flang] [clang] [openmp] [clang-tools-extra] [libcxxabi] [libcxx] [compiler-rt] [llvm] [AArch64] Add custom lowering for load <3 x i8>. (PR #78632)

2024-01-30 Thread Florian Hahn via cfe-commits
fhahn wrote: Thanks for taking a look @TNorthover! I tried to address the comments, but with them addressed it turned out to not really be feasible to go down that path. I changed the codegen back to use the slightly longer (but using instructions that are cheaper/less complex usually) below,

[clang-tools-extra] [llvm] [Matrix] Convert column-vector ops feeding dot product to row-vectors. (PR #72647)

2024-01-12 Thread Florian Hahn via 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 row-ve

[clang-tools-extra] [llvm] [Matrix] Convert column-vector ops feeding dot product to row-vectors. (PR #72647)

2024-01-12 Thread Florian Hahn via cfe-commits
@@ -1391,7 +1394,26 @@ class LowerMatrixIntrinsics { return TTI.getMemoryOpCost(Instruction::Load, VecTy, Align(1), 0) - N * TTI.getMemoryOpCost(Instruction::Load, EltTy, Align(1), 0); }; -auto LHSCost = GetCostForArg(LHS, LShape.NumColumns); + --

[flang] [llvm] [clang-tools-extra] [clang] [compiler-rt] [VPlan] Replace VPRecipeOrVPValue with VP2VP recipe simplification. (PR #76090)

2024-01-15 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/76090 >From 7c31c8bc2acf60bd50cb6d63944ee8d4946b9638 Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Thu, 4 May 2023 21:33:24 +0100 Subject: [PATCH] [VPlan] Replace VPRecieOrVPValue with VP2VP recipe simplification. M

[clang-tools-extra] [flang] [clang] [llvm] [compiler-rt] [VPlan] Replace VPRecipeOrVPValue with VP2VP recipe simplification. (PR #76090)

2024-01-16 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/76090 >From 7c31c8bc2acf60bd50cb6d63944ee8d4946b9638 Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Thu, 4 May 2023 21:33:24 +0100 Subject: [PATCH 1/2] [VPlan] Replace VPRecieOrVPValue with VP2VP recipe simplification

[llvm] [compiler-rt] [clang] [clang-tools-extra] [flang] [VPlan] Replace VPRecipeOrVPValue with VP2VP recipe simplification. (PR #76090)

2024-01-16 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/76090 >From 7c31c8bc2acf60bd50cb6d63944ee8d4946b9638 Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Thu, 4 May 2023 21:33:24 +0100 Subject: [PATCH 1/3] [VPlan] Replace VPRecieOrVPValue with VP2VP recipe simplification

[llvm] [compiler-rt] [clang] [clang-tools-extra] [flang] [VPlan] Replace VPRecipeOrVPValue with VP2VP recipe simplification. (PR #76090)

2024-01-16 Thread Florian Hahn via cfe-commits
https://github.com/fhahn commented: Thanks for taking a look, comments should be addressed! > Wonder if tryTo*()'s should return more specific recipes than VPRecipeBase*, > as in tryToBlend(). That would probably be good now! Should I adjust the current patch or do as follow-up? https://g

[clang-tools-extra] [flang] [clang] [llvm] [compiler-rt] [VPlan] Replace VPRecipeOrVPValue with VP2VP recipe simplification. (PR #76090)

2024-01-16 Thread Florian Hahn via cfe-commits
https://github.com/fhahn edited https://github.com/llvm/llvm-project/pull/76090 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[compiler-rt] [clang] [flang] [clang-tools-extra] [llvm] [VPlan] Replace VPRecipeOrVPValue with VP2VP recipe simplification. (PR #76090)

2024-01-16 Thread Florian Hahn via cfe-commits
@@ -9079,6 +9043,9 @@ void LoopVectorizationPlanner::adjustRecipesForReductions( LinkVPBB->insert(FMulRecipe, CurrentLink->getIterator()); VecOp = FMulRecipe; } else { +if (PhiR->isInLoop() && isa(CurrentLink)) + continue; + --

[clang] [flang] [clang-tools-extra] [compiler-rt] [llvm] [VPlan] Replace VPRecipeOrVPValue with VP2VP recipe simplification. (PR #76090)

2024-01-16 Thread Florian Hahn via cfe-commits
@@ -112,7 +112,6 @@ struct VPlanTransforms { /// Remove redundant EpxandSCEVRecipes in \p Plan's entry block by replacing /// them with already existing recipes expanding the same SCEV expression. static void removeRedundantExpandSCEVRecipes(VPlan &Plan); - --

[llvm] [compiler-rt] [clang] [clang-tools-extra] [flang] [VPlan] Replace VPRecipeOrVPValue with VP2VP recipe simplification. (PR #76090)

2024-01-16 Thread Florian Hahn via cfe-commits
@@ -806,6 +806,38 @@ static unsigned getOpcodeForRecipe(VPRecipeBase &R) { /// Try to simplify recipe \p R. static void simplifyRecipe(VPRecipeBase &R, VPTypeAnalysis &TypeInfo) { + // Try to remove redundant blend recipes. + if (auto *Blend = dyn_cast(&R)) { +if (Blend-

[compiler-rt] [llvm] [flang] [clang] [clang-tools-extra] [VPlan] Replace VPRecipeOrVPValue with VP2VP recipe simplification. (PR #76090)

2024-01-16 Thread Florian Hahn via cfe-commits
@@ -8292,13 +8271,13 @@ VPRecipeOrVPValueTy VPRecipeBuilder::tryToBlend(PHINode *Phi, for (unsigned In = 0; In < NumIncoming; In++) { VPValue *EdgeMask = createEdgeMask(Phi->getIncomingBlock(In), Phi->getParent(), *Plan); -assert((EdgeMask || NumIncoming == 1

[llvm] [compiler-rt] [clang] [flang] [clang-tools-extra] [VPlan] Replace VPRecipeOrVPValue with VP2VP recipe simplification. (PR #76090)

2024-01-16 Thread Florian Hahn via cfe-commits
@@ -996,8 +1028,8 @@ void VPlanTransforms::optimize(VPlan &Plan, ScalarEvolution &SE) { removeRedundantCanonicalIVs(Plan); removeRedundantInductionCasts(Plan); - optimizeInductions(Plan, SE); simplifyRecipes(Plan, SE.getContext()); + optimizeInductions(Plan, SE); ---

[clang] [flang] [llvm] [clang-tools-extra] [compiler-rt] [VPlan] Replace VPRecipeOrVPValue with VP2VP recipe simplification. (PR #76090)

2024-01-16 Thread Florian Hahn via cfe-commits
@@ -8966,10 +8930,10 @@ VPlanPtr LoopVectorizationPlanner::buildVPlan(VFRange &Range) { } // Adjust the recipes for reductions. For in-loop reductions the chain of -// instructions leading from the loop exit instr to the phi need to be converted -// to reductions, with one o

[llvm] [flang] [clang-tools-extra] [clang] [compiler-rt] [VPlan] Replace VPRecipeOrVPValue with VP2VP recipe simplification. (PR #76090)

2024-01-16 Thread Florian Hahn via cfe-commits
@@ -806,6 +806,38 @@ static unsigned getOpcodeForRecipe(VPRecipeBase &R) { /// Try to simplify recipe \p R. static void simplifyRecipe(VPRecipeBase &R, VPTypeAnalysis &TypeInfo) { + // Try to remove redundant blend recipes. + if (auto *Blend = dyn_cast(&R)) { +if (Blend-

[clang] [llvm] [clang-tools-extra] [CGP] Avoid replacing a free ext with multiple other exts. (PR #77094)

2024-01-18 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/77094 >From 46fbecfce6c48795ea85fc9420067479f6d0b17a Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Fri, 5 Jan 2024 11:24:59 + Subject: [PATCH] [CGP] Avoid replacing a free ext with multiple other exts. Replacing

[clang-tools-extra] [clang] [llvm] [CGP] Avoid replacing a free ext with multiple other exts. (PR #77094)

2024-01-18 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/77094 >From 46fbecfce6c48795ea85fc9420067479f6d0b17a Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Fri, 5 Jan 2024 11:24:59 + Subject: [PATCH 1/2] [CGP] Avoid replacing a free ext with multiple other exts. Repla

[clang-tools-extra] [clang] [llvm] [CGP] Avoid replacing a free ext with multiple other exts. (PR #77094)

2024-01-18 Thread Florian Hahn via cfe-commits
https://github.com/fhahn closed https://github.com/llvm/llvm-project/pull/77094 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang-tools-extra] [VPlan] Introduce VPSingleDefRecipe. (PR #77023)

2024-01-19 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/77023 >From ddecbda9f079584a55feed322d8d20b766349ab9 Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Thu, 4 Jan 2024 22:07:31 + Subject: [PATCH 1/3] [VPlan] Introduce VPSingleDefRecipe. This patch introduces a new

[clang] [llvm] [clang-tools-extra] [VPlan] Introduce VPSingleDefRecipe. (PR #77023)

2024-01-19 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/77023 >From ddecbda9f079584a55feed322d8d20b766349ab9 Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Thu, 4 Jan 2024 22:07:31 + Subject: [PATCH 1/4] [VPlan] Introduce VPSingleDefRecipe. This patch introduces a new

[clang-tools-extra] [llvm] [clang] [VPlan] Introduce VPSingleDefRecipe. (PR #77023)

2024-01-19 Thread Florian Hahn via cfe-commits
@@ -12,6 +12,8 @@ ///VPBlockBase, together implementing a Hierarchical CFG; /// 2. Pure virtual VPRecipeBase serving as the base class for recipes contained ///within VPBasicBlocks; +/// 3. Pure virtual VPSingleDefRecipe serving as a base class for recipes that +///

[clang] [llvm] [clang-tools-extra] [VPlan] Introduce VPSingleDefRecipe. (PR #77023)

2024-01-19 Thread Florian Hahn via cfe-commits
@@ -819,10 +812,77 @@ class VPRecipeBase : public ilist_node_with_parent, } \ static inline bool classof(const VPRecipeBase *R) { \ return R->getVPDefID() == VPDefID;

[llvm] [clang] [clang-tools-extra] [VPlan] Introduce VPSingleDefRecipe. (PR #77023)

2024-01-19 Thread Florian Hahn via cfe-commits
@@ -819,10 +812,77 @@ class VPRecipeBase : public ilist_node_with_parent, } \ static inline bool classof(const VPRecipeBase *R) { \ return R->getVPDefID() == VPDefID;

[llvm] [clang] [clang-tools-extra] [VPlan] Introduce VPSingleDefRecipe. (PR #77023)

2024-01-19 Thread Florian Hahn via cfe-commits
@@ -819,10 +812,77 @@ class VPRecipeBase : public ilist_node_with_parent, } \ static inline bool classof(const VPRecipeBase *R) { \ return R->getVPDefID() == VPDefID;

[llvm] [clang-tools-extra] [clang] [VPlan] Introduce VPSingleDefRecipe. (PR #77023)

2024-01-19 Thread Florian Hahn via cfe-commits
@@ -912,25 +970,28 @@ class VPRecipeWithIRFlags : public VPRecipeBase { } else if (auto *Op = dyn_cast(&I)) { OpType = OperationType::FPMathOp; FMFs = Op->getFastMathFlags(); +} else { + OpType = OperationType::Other; + AllFlags = 0; --

[clang] [llvm] [clang-tools-extra] [VPlan] Introduce VPSingleDefRecipe. (PR #77023)

2024-01-19 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/77023 >From ddecbda9f079584a55feed322d8d20b766349ab9 Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Thu, 4 Jan 2024 22:07:31 + Subject: [PATCH 1/5] [VPlan] Introduce VPSingleDefRecipe. This patch introduces a new

[llvm] [clang-tools-extra] [clang] [VPlan] Introduce VPSingleDefRecipe. (PR #77023)

2024-01-19 Thread Florian Hahn via cfe-commits
https://github.com/fhahn closed https://github.com/llvm/llvm-project/pull/77023 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][PP] Add extension to predefine target OS macros (PR #74676)

2024-01-19 Thread Florian Hahn via cfe-commits
fhahn wrote: It looks like this may also break both Blender and Povray. Worked around build failures in SPEC2017 in llvm-test-suite in 9b14a92d585657b87f2ca2b135ba9044685393be, but the projects will likely need to be fixed at the source. https://github.com/llvm/llvm-project/pull/74676 ___

[llvm] [clang] [libcxx] [lld] [openmp] [lto] Add minimum macos sdk requirement to test (PR #77695)

2024-01-19 Thread Florian Hahn via cfe-commits
@@ -5,6 +5,8 @@ ; RUN: %ld64 -lto_library %llvmshlibdir/libLTO.dylib -dylib -arch x86_64 -macos_version_min 10.10.0 -o %t.dylib %t.o -save-temps -undefined dynamic_lookup -exported_symbol _bar -lSystem -mllvm -lto-discard-value-names=false ; RUN: llvm-dis %t.dylib.lto.opt.bc

[llvm] [clang-tools-extra] [clang] [VPlan] Implement cloning of VPlans. (PR #73158)

2024-01-19 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/73158 >From 13a26e8e7440c3b501730b22588af393a3e543cd Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Thu, 6 Jul 2023 08:07:45 +0100 Subject: [PATCH] [VPlan] Implement cloning of VPlans. This patch implements cloning fo

[clang-tools-extra] [libc] [lld] [libcxx] [llvm] [clang] [flang] [lldb] [compiler-rt] [VPlan] Implement cloning of VPlans. (PR #73158)

2024-01-20 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/73158 >From 13a26e8e7440c3b501730b22588af393a3e543cd Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Thu, 6 Jul 2023 08:07:45 +0100 Subject: [PATCH] [VPlan] Implement cloning of VPlans. This patch implements cloning fo

[lldb] [lld] [llvm] [libcxx] [flang] [compiler-rt] [clang-tools-extra] [libc] [clang] [VPlan] Implement cloning of VPlans. (PR #73158)

2024-01-21 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/73158 >From 13a26e8e7440c3b501730b22588af393a3e543cd Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Thu, 6 Jul 2023 08:07:45 +0100 Subject: [PATCH 1/2] [VPlan] Implement cloning of VPlans. This patch implements clonin

[lldb] [lld] [llvm] [libcxx] [flang] [compiler-rt] [clang-tools-extra] [libc] [clang] [VPlan] Implement cloning of VPlans. (PR #73158)

2024-01-21 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/73158 >From 13a26e8e7440c3b501730b22588af393a3e543cd Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Thu, 6 Jul 2023 08:07:45 +0100 Subject: [PATCH 1/2] [VPlan] Implement cloning of VPlans. This patch implements clonin

[lldb] [lld] [llvm] [libcxx] [flang] [compiler-rt] [clang-tools-extra] [libc] [clang] [VPlan] Implement cloning of VPlans. (PR #73158)

2024-01-21 Thread Florian Hahn via cfe-commits
https://github.com/fhahn edited https://github.com/llvm/llvm-project/pull/73158 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[lld] [flang] [llvm] [lldb] [clang-tools-extra] [clang] [libc] [compiler-rt] [libcxx] [VPlan] Implement cloning of VPlans. (PR #73158)

2024-01-21 Thread Florian Hahn via cfe-commits
@@ -982,6 +994,65 @@ void VPlan::updateDominatorTree(DominatorTree *DT, BasicBlock *LoopHeaderBB, assert(DT->verify(DominatorTree::VerificationLevel::Fast)); } +static void remapVPValues(VPBasicBlock *OldBB, VPBasicBlock *NewBB, + DenseMap &Old2NewV

[llvm] [libcxx] [compiler-rt] [lldb] [clang] [libc] [lld] [clang-tools-extra] [flang] [VPlan] Implement cloning of VPlans. (PR #73158)

2024-01-21 Thread Florian Hahn via cfe-commits
@@ -982,6 +994,65 @@ void VPlan::updateDominatorTree(DominatorTree *DT, BasicBlock *LoopHeaderBB, assert(DT->verify(DominatorTree::VerificationLevel::Fast)); } +static void remapVPValues(VPBasicBlock *OldBB, VPBasicBlock *NewBB, + DenseMap &Old2NewV

[libcxx] [clang-tools-extra] [lld] [clang] [flang] [libc] [compiler-rt] [llvm] [lldb] [VPlan] Implement cloning of VPlans. (PR #73158)

2024-01-21 Thread Florian Hahn via cfe-commits
@@ -1200,6 +1271,59 @@ void VPUser::printOperands(raw_ostream &O, VPSlotTracker &SlotTracker) const { } #endif +VPBlockBase *VPBlockUtils::cloneCFG( +VPBlockBase *Entry, DenseMap &Old2New, +DenseMap &Old2NewVPValues, bool FullRemapping) { + ReversePostOrderTraversal>

[llvm] [lldb] [compiler-rt] [lld] [libc] [libcxx] [clang] [flang] [clang-tools-extra] [VPlan] Implement cloning of VPlans. (PR #73158)

2024-01-21 Thread Florian Hahn via cfe-commits
@@ -1594,6 +1657,13 @@ class VPWidenPHIRecipe : public VPHeaderPHIRecipe { addOperand(Start); } + VPRecipeBase *clone() override { +auto *Res = new VPWidenPHIRecipe(cast(getUnderlyingInstr()), fhahn wrote: Yep https://github.com/llvm/llvm-projec

[clang] [lldb] [llvm] [libcxx] [lld] [flang] [libc] [compiler-rt] [clang-tools-extra] [VPlan] Implement cloning of VPlans. (PR #73158)

2024-01-21 Thread Florian Hahn via cfe-commits
@@ -982,6 +994,65 @@ void VPlan::updateDominatorTree(DominatorTree *DT, BasicBlock *LoopHeaderBB, assert(DT->verify(DominatorTree::VerificationLevel::Fast)); } +static void remapVPValues(VPBasicBlock *OldBB, VPBasicBlock *NewBB, + DenseMap &Old2NewV

[libcxx] [compiler-rt] [clang] [libc] [flang] [clang-tools-extra] [llvm] [lld] [lldb] [VPlan] Implement cloning of VPlans. (PR #73158)

2024-01-21 Thread Florian Hahn via cfe-commits
@@ -615,6 +615,18 @@ void VPBasicBlock::print(raw_ostream &O, const Twine &Indent, } #endif +VPBlockBase *VPRegionBlock::clone() { + DenseMap Old2New; + DenseMap Old2NewVPValues; + VPBlockBase *NewEntry = + VPBlockUtils::cloneCFG(Entry, Old2New, Old2NewVPValues); + a

[libcxx] [lld] [clang-tools-extra] [libc] [compiler-rt] [llvm] [lldb] [flang] [clang] [VPlan] Implement cloning of VPlans. (PR #73158)

2024-01-21 Thread Florian Hahn via cfe-commits
@@ -1200,6 +1271,59 @@ void VPUser::printOperands(raw_ostream &O, VPSlotTracker &SlotTracker) const { } #endif +VPBlockBase *VPBlockUtils::cloneCFG( +VPBlockBase *Entry, DenseMap &Old2New, +DenseMap &Old2NewVPValues, bool FullRemapping) { + ReversePostOrderTraversal>

[libcxx] [lld] [compiler-rt] [libc] [clang-tools-extra] [llvm] [flang] [clang] [lldb] [VPlan] Implement cloning of VPlans. (PR #73158)

2024-01-21 Thread Florian Hahn via cfe-commits
@@ -2262,9 +2400,22 @@ class VPDerivedIVRecipe : public VPRecipeBase, public VPValue { VPValue(this), TruncResultTy(TruncResultTy), Kind(IndDesc.getKind()), FPBinOp(dyn_cast_or_null(IndDesc.getInductionBinOp())) { } fhahn wrote: Updated, th

[libcxx] [flang] [llvm] [libc] [lld] [clang-tools-extra] [compiler-rt] [lldb] [clang] [VPlan] Implement cloning of VPlans. (PR #73158)

2024-01-21 Thread Florian Hahn via cfe-commits
@@ -1200,6 +1271,59 @@ void VPUser::printOperands(raw_ostream &O, VPSlotTracker &SlotTracker) const { } #endif +VPBlockBase *VPBlockUtils::cloneCFG( +VPBlockBase *Entry, DenseMap &Old2New, +DenseMap &Old2NewVPValues, bool FullRemapping) { + ReversePostOrderTraversal>

[clang] [flang] [lld] [lldb] [llvm] [libcxx] [compiler-rt] [clang-tools-extra] [libc] [VPlan] Implement cloning of VPlans. (PR #73158)

2024-01-21 Thread Florian Hahn via cfe-commits
@@ -615,6 +615,18 @@ void VPBasicBlock::print(raw_ostream &O, const Twine &Indent, } #endif +VPBlockBase *VPRegionBlock::clone() { fhahn wrote: Updated, thanks! Also removed `VPBlockBase::clone` and moved to static functions, as without remapping it is not

[clang-tools-extra] [lldb] [flang] [libc] [lld] [llvm] [libcxx] [clang] [compiler-rt] [VPlan] Implement cloning of VPlans. (PR #73158)

2024-01-21 Thread Florian Hahn via cfe-commits
@@ -2262,9 +2400,22 @@ class VPDerivedIVRecipe : public VPRecipeBase, public VPValue { VPValue(this), TruncResultTy(TruncResultTy), Kind(IndDesc.getKind()), FPBinOp(dyn_cast_or_null(IndDesc.getInductionBinOp())) { } + VPDerivedIVRecipe(InductionDescriptor::

[clang-tools-extra] [flang] [libc] [libcxx] [lldb] [compiler-rt] [llvm] [clang] [lld] [VPlan] Implement cloning of VPlans. (PR #73158)

2024-01-21 Thread Florian Hahn via cfe-commits
@@ -982,6 +994,65 @@ void VPlan::updateDominatorTree(DominatorTree *DT, BasicBlock *LoopHeaderBB, assert(DT->verify(DominatorTree::VerificationLevel::Fast)); } +static void remapVPValues(VPBasicBlock *OldBB, VPBasicBlock *NewBB, + DenseMap &Old2NewV

[flang] [llvm] [compiler-rt] [clang] [clang-tools-extra] [libc] [lld] [lldb] [libcxx] [VPlan] Implement cloning of VPlans. (PR #73158)

2024-01-21 Thread Florian Hahn via cfe-commits
@@ -982,6 +994,65 @@ void VPlan::updateDominatorTree(DominatorTree *DT, BasicBlock *LoopHeaderBB, assert(DT->verify(DominatorTree::VerificationLevel::Fast)); } +static void remapVPValues(VPBasicBlock *OldBB, VPBasicBlock *NewBB, + DenseMap &Old2NewV

[libc] [llvm] [compiler-rt] [clang] [lld] [clang-tools-extra] [flang] [lldb] [libcxx] [VPlan] Implement cloning of VPlans. (PR #73158)

2024-01-21 Thread Florian Hahn via cfe-commits
@@ -615,6 +615,18 @@ void VPBasicBlock::print(raw_ostream &O, const Twine &Indent, } #endif +VPBlockBase *VPRegionBlock::clone() { + DenseMap Old2New; fhahn wrote: Renamed, thanks! https://github.com/llvm/llvm-project/pull/73158 ___

[lld] [llvm] [clang-tools-extra] [lldb] [libcxx] [flang] [clang] [libc] [compiler-rt] [VPlan] Implement cloning of VPlans. (PR #73158)

2024-01-21 Thread Florian Hahn via cfe-commits
@@ -2807,6 +2976,8 @@ class VPlan { VPBasicBlock *getPreheader() { return Preheader; } const VPBasicBlock *getPreheader() const { return Preheader; } fhahn wrote: Done, thanks! https://github.com/llvm/llvm-project/pull/73158 _

[libcxx] [lld] [clang-tools-extra] [compiler-rt] [llvm] [libc] [clang] [lldb] [flang] [VPlan] Implement cloning of VPlans. (PR #73158)

2024-01-21 Thread Florian Hahn via cfe-commits
@@ -982,6 +994,65 @@ void VPlan::updateDominatorTree(DominatorTree *DT, BasicBlock *LoopHeaderBB, assert(DT->verify(DominatorTree::VerificationLevel::Fast)); } +static void remapVPValues(VPBasicBlock *OldBB, VPBasicBlock *NewBB, + DenseMap &Old2NewV

[clang] [libc] [clang-tools-extra] [llvm] [lldb] [lld] [compiler-rt] [libcxx] [flang] [VPlan] Implement cloning of VPlans. (PR #73158)

2024-01-21 Thread Florian Hahn via cfe-commits
@@ -982,6 +994,65 @@ void VPlan::updateDominatorTree(DominatorTree *DT, BasicBlock *LoopHeaderBB, assert(DT->verify(DominatorTree::VerificationLevel::Fast)); } +static void remapVPValues(VPBasicBlock *OldBB, VPBasicBlock *NewBB, + DenseMap &Old2NewV

[lld] [llvm] [compiler-rt] [libc] [clang] [lldb] [clang-tools-extra] [libcxx] [flang] [VPlan] Implement cloning of VPlans. (PR #73158)

2024-01-21 Thread Florian Hahn via cfe-commits
@@ -982,6 +994,65 @@ void VPlan::updateDominatorTree(DominatorTree *DT, BasicBlock *LoopHeaderBB, assert(DT->verify(DominatorTree::VerificationLevel::Fast)); } +static void remapVPValues(VPBasicBlock *OldBB, VPBasicBlock *NewBB, + DenseMap &Old2NewV

[libc] [libcxx] [lld] [compiler-rt] [clang-tools-extra] [llvm] [clang] [lldb] [flang] [VPlan] Implement cloning of VPlans. (PR #73158)

2024-01-21 Thread Florian Hahn via cfe-commits
@@ -10078,7 +10078,7 @@ bool LoopVectorizePass::processLoop(Loop *L) { EpilogueVectorizerMainLoop MainILV(L, PSE, LI, DT, TLI, TTI, AC, ORE, EPI, &LVL, &CM, BFI, PSI, Checks); -VPlan &BestMainPlan = LVP.getBestPlanFor(

[llvm] [clang-tools-extra] [clang] [VPlan] Add new VPUniformPerUFRecipe, use for step truncation. (PR #78113)

2024-01-21 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/78113 >From 36b085f21b76d7bf7c9965a86a09d1cef4fe9329 Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Sun, 14 Jan 2024 14:13:08 + Subject: [PATCH] [VPlan] Add new VPUniformPerUFRecipe, use for step truncation. Add

[clang] [clang-tools-extra] [llvm] [VPlan] Add new VPUniformPerUFRecipe, use for step truncation. (PR #78113)

2024-01-21 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/78113 >From 36b085f21b76d7bf7c9965a86a09d1cef4fe9329 Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Sun, 14 Jan 2024 14:13:08 + Subject: [PATCH 1/2] [VPlan] Add new VPUniformPerUFRecipe, use for step truncation.

[clang-tools-extra] [llvm] [clang] [VPlan] Add new VPUniformPerUFRecipe, use for step truncation. (PR #78113)

2024-01-21 Thread Florian Hahn via cfe-commits
fhahn wrote: > The VPUniformPerUFRecipe of the current patch deals only with casts, so best > name it as such, at-least for now, and define it comparable to > VPWidenCastRecipe. Perhaps VPScalarCastRecipe would work - it effectively > serves Invariant values placed outside the loop that are Un

[clang] [clang-tools-extra] [llvm] [VPlan] Add new VPUniformPerUFRecipe, use for step truncation. (PR #78113)

2024-01-22 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/78113 >From 36b085f21b76d7bf7c9965a86a09d1cef4fe9329 Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Sun, 14 Jan 2024 14:13:08 + Subject: [PATCH 1/3] [VPlan] Add new VPUniformPerUFRecipe, use for step truncation.

[clang] [clang-tools-extra] [llvm] [VPlan] Add new VPUniformPerUFRecipe, use for step truncation. (PR #78113)

2024-01-22 Thread Florian Hahn via cfe-commits
@@ -1338,6 +1339,34 @@ class VPWidenCastRecipe : public VPRecipeWithIRFlags { Type *getResultType() const { return ResultTy; } }; +/// VPScalarCastRecipe is a recipe o create scalar cast instructions. +class VPScalarCastRecipe : public VPRecipeBase, public VPValue { + /// C

[llvm] [clang] [clang-tools-extra] [VPlan] Add new VPUniformPerUFRecipe, use for step truncation. (PR #78113)

2024-01-22 Thread Florian Hahn via cfe-commits
@@ -1338,6 +1339,34 @@ class VPWidenCastRecipe : public VPRecipeWithIRFlags { Type *getResultType() const { return ResultTy; } }; +/// VPScalarCastRecipe is a recipe o create scalar cast instructions. +class VPScalarCastRecipe : public VPRecipeBase, public VPValue {

[clang] [clang-tools-extra] [llvm] [VPlan] Add new VPUniformPerUFRecipe, use for step truncation. (PR #78113)

2024-01-22 Thread Florian Hahn via cfe-commits
@@ -230,7 +230,11 @@ Type *VPTypeAnalysis::inferScalarType(const VPValue *V) { return V->getUnderlyingValue()->getType(); }) .Case( - [](const VPWidenCastRecipe *R) { return R->getResultType(); }); + [](const VPWidenCast

[clang] [clang-tools-extra] [llvm] [VPlan] Add new VPUniformPerUFRecipe, use for step truncation. (PR #78113)

2024-01-22 Thread Florian Hahn via cfe-commits
@@ -1338,6 +1339,34 @@ class VPWidenCastRecipe : public VPRecipeWithIRFlags { Type *getResultType() const { return ResultTy; } }; +/// VPScalarCastRecipe is a recipe o create scalar cast instructions. +class VPScalarCastRecipe : public VPRecipeBase, public VPValue { + /// C

[clang] [clang-tools-extra] [llvm] [VPlan] Add new VPUniformPerUFRecipe, use for step truncation. (PR #78113)

2024-01-22 Thread Florian Hahn via cfe-commits
@@ -1338,6 +1339,34 @@ class VPWidenCastRecipe : public VPRecipeWithIRFlags { Type *getResultType() const { return ResultTy; } }; +/// VPScalarCastRecipe is a recipe o create scalar cast instructions. fhahn wrote: Fixed, thanks! https://github.com/llvm/llv

[llvm] [clang-tools-extra] [clang] [VPlan] Add new VPUniformPerUFRecipe, use for step truncation. (PR #78113)

2024-01-22 Thread Florian Hahn via cfe-commits
@@ -504,6 +504,15 @@ static VPValue *createScalarIVSteps(VPlan &Plan, const InductionDescriptor &ID, HeaderVPBB->insert(BaseIV->getDefiningRecipe(), IP); } + VPTypeAnalysis TypeInfo(SE.getContext()); + if (TypeInfo.inferScalarType(BaseIV) != TypeInfo.inferScalarType(S

[clang] [clang-tools-extra] [llvm] [VPlan] Add new VPUniformPerUFRecipe, use for step truncation. (PR #78113)

2024-01-22 Thread Florian Hahn via cfe-commits
@@ -1469,6 +1465,47 @@ void VPReplicateRecipe::print(raw_ostream &O, const Twine &Indent, } #endif +Value *VPScalarCastRecipe ::generate(VPTransformState &State, unsigned Part) { + assert(vputils::onlyFirstLaneUsed(this) && + "Codegen only implemented for first lane

[clang] [llvm] [clang-tools-extra] [VPlan] Add new VPUniformPerUFRecipe, use for step truncation. (PR #78113)

2024-01-22 Thread Florian Hahn via cfe-commits
@@ -1338,6 +1339,34 @@ class VPWidenCastRecipe : public VPRecipeWithIRFlags { Type *getResultType() const { return ResultTy; } }; +/// VPScalarCastRecipe is a recipe o create scalar cast instructions. +class VPScalarCastRecipe : public VPRecipeBase, public VPValue { + /// C

[clang] [clang-tools-extra] [llvm] [VPlan] Add new VPUniformPerUFRecipe, use for step truncation. (PR #78113)

2024-01-22 Thread Florian Hahn via cfe-commits
@@ -164,6 +164,8 @@ bool VPRecipeBase::mayHaveSideEffects() const { auto *R = cast(this); return R->getUnderlyingInstr()->mayHaveSideEffects(); } + case VPScalarCastSC: +return false; fhahn wrote: moved, thanks! https://github.com/llvm/llvm-pro

[clang-tools-extra] [clang] [llvm] [VPlan] Add new VPUniformPerUFRecipe, use for step truncation. (PR #78113)

2024-01-22 Thread Florian Hahn via cfe-commits
@@ -1469,6 +1465,47 @@ void VPReplicateRecipe::print(raw_ostream &O, const Twine &Indent, } #endif +Value *VPScalarCastRecipe ::generate(VPTransformState &State, unsigned Part) { + assert(vputils::onlyFirstLaneUsed(this) && + "Codegen only implemented for first lane

[llvm] [clang] [clang-tools-extra] [VPlan] Add new VPUniformPerUFRecipe, use for step truncation. (PR #78113)

2024-01-22 Thread Florian Hahn via cfe-commits
@@ -362,6 +362,7 @@ class VPDef { // START: Phi-like recipes. Need to be kept together. VPBlendSC, VPPredInstPHISC, +VPScalarCastSC, fhahn wrote: Moved, thanks! https://github.com/llvm/llvm-project/pull/78113 __

[llvm] [clang-tools-extra] [clang] [VPlan] Add new VPUniformPerUFRecipe, use for step truncation. (PR #78113)

2024-01-22 Thread Florian Hahn via cfe-commits
@@ -1117,13 +1119,7 @@ void VPScalarIVStepsRecipe::execute(VPTransformState &State) { // Ensure step has the same type as that of scalar IV. Type *BaseIVTy = BaseIV->getType()->getScalarType(); - if (BaseIVTy != Step->getType()) { -// TODO: Also use VPDerivedIVRecipe

[clang-tools-extra] [llvm] [clang] [VPlan] Add new VPUniformPerUFRecipe, use for step truncation. (PR #78113)

2024-01-22 Thread Florian Hahn via cfe-commits
@@ -1469,6 +1465,47 @@ void VPReplicateRecipe::print(raw_ostream &O, const Twine &Indent, } #endif +Value *VPScalarCastRecipe ::generate(VPTransformState &State, unsigned Part) { + assert(vputils::onlyFirstLaneUsed(this) && + "Codegen only implemented for first lane

[clang-tools-extra] [llvm] [clang] [VPlan] Add new VPUniformPerUFRecipe, use for step truncation. (PR #78113)

2024-01-22 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/78113 >From 36b085f21b76d7bf7c9965a86a09d1cef4fe9329 Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Sun, 14 Jan 2024 14:13:08 + Subject: [PATCH 1/4] [VPlan] Add new VPUniformPerUFRecipe, use for step truncation.

[clang] [clang-tools-extra] [libc] [flang] [compiler-rt] [llvm] [AArch64] Add custom lowering for load <3 x i8>. (PR #78632)

2024-01-22 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/78632 >From a786cdedc2c9a9898cd0b80d84f5b11aace5da1c Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Tue, 28 Nov 2023 15:44:02 + Subject: [PATCH 1/2] [AArch64] Add custom lowering for load <3 x i8>. Add custom comb

[clang] [clang-tools-extra] [libc] [flang] [compiler-rt] [llvm] [AArch64] Combine store (trunc X to <3 x i8>) to sequence of ST1.b. (PR #78637)

2024-01-22 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/78637 >From efd07e93aed51049ad3783c701284617ae446330 Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Wed, 17 Jan 2024 11:11:59 + Subject: [PATCH 1/2] [AArch64] Combine store (trunc X to <3 x i8>) to sequence of ST1

<    1   2   3   4   5   6   7   >