Revert "[WebAssembly] Mark extract.last.active as having invalid cost."#180942
Revert "[WebAssembly] Mark extract.last.active as having invalid cost."#180942
Conversation
The failures should have been resolved with llvm#180290 (which also added WebAssembly tests). This reverts commit 811fb22.
|
@llvm/pr-subscribers-llvm-analysis @llvm/pr-subscribers-backend-webassembly Author: Benjamin Maxwell (MacDue) ChangesThe failures should have been resolved with #180290 (which also added WebAssembly tests). This reverts commit 811fb22. Full diff: https://github.com/llvm/llvm-project/pull/180942.diff 2 Files Affected:
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyTargetTransformInfo.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyTargetTransformInfo.cpp
index 33498805112c0..f058d734bcb87 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyTargetTransformInfo.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyTargetTransformInfo.cpp
@@ -453,19 +453,6 @@ InstructionCost WebAssemblyTTIImpl::getPartialReductionCost(
return Invalid;
}
-InstructionCost
-WebAssemblyTTIImpl::getIntrinsicInstrCost(const IntrinsicCostAttributes &ICA,
- TTI::TargetCostKind CostKind) const {
- switch (ICA.getID()) {
- case Intrinsic::experimental_vector_extract_last_active:
- // TODO: Remove once the intrinsic can be lowered without crashes.
- return InstructionCost::getInvalid();
- default:
- break;
- }
- return BaseT::getIntrinsicInstrCost(ICA, CostKind);
-}
-
TTI::ReductionShuffle WebAssemblyTTIImpl::getPreferredExpandedReductionShuffle(
const IntrinsicInst *II) const {
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyTargetTransformInfo.h b/llvm/lib/Target/WebAssembly/WebAssemblyTargetTransformInfo.h
index 924249e051321..9b6de65f17c7f 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyTargetTransformInfo.h
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyTargetTransformInfo.h
@@ -98,10 +98,6 @@ class WebAssemblyTTIImpl final : public BasicTTIImplBase<WebAssemblyTTIImpl> {
TTI::TargetCostKind CostKind,
std::optional<FastMathFlags> FMF) const override;
- InstructionCost
- getIntrinsicInstrCost(const IntrinsicCostAttributes &ICA,
- TTI::TargetCostKind CostKind) const override;
-
TTI::ReductionShuffle
getPreferredExpandedReductionShuffle(const IntrinsicInst *II) const override;
|
fhahn
left a comment
There was a problem hiding this comment.
Thanks for following up on this!
Would be good to have a test case if possible, either checking the cost on webassembly or checking the loop that previously crashes gets vectorized now
|
I've added a basic cost model test 👍 |
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/65/builds/29945 Here is the relevant piece of the build log for the reference |
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/225/builds/2675 Here is the relevant piece of the build log for the reference |
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/144/builds/46709 Here is the relevant piece of the build log for the reference |
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/10/builds/22565 Here is the relevant piece of the build log for the reference |
|
Reverted for now, as it appears something has changed the CostModel since I updated this PR yesterday. I’ll look into this later. |
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/54/builds/16832 Here is the relevant piece of the build log for the reference |
|
Probably need to limit the test to WebAssembly, I forgot about the |
…having invalid cost."" (#181342) Reverts llvm/llvm-project#180942 Looks like something changed the cost model. Will investigate later.
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/180/builds/32951 Here is the relevant piece of the build log for the reference |
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/160/builds/32811 Here is the relevant piece of the build log for the reference |
…." (llvm#180942) The failures should have been resolved with llvm#180290 (which also added WebAssembly tests). This reverts commit 811fb22.
…lid cost."" (llvm#181342) Reverts llvm#180942 Looks like something changed the cost model. Will investigate later.
…." (llvm#181545) The failures should have been resolved with llvm#180290 (which also added WebAssembly tests). This reverts commit llvm@811fb22. --- This is the same as llvm#180942, but with a `lit.local.cfg` added to the CostModel test folder.
…." (llvm#181545) The failures should have been resolved with llvm#180290 (which also added WebAssembly tests). This reverts commit llvm@811fb22. --- This is the same as llvm#180942, but with a `lit.local.cfg` added to the CostModel test folder.
The failures should have been resolved with #180290 (which also added WebAssembly tests).
This reverts commit 811fb22.