[llvm-branch-commits] [llvm] AMDGPU: Report special input intrinsics as free (PR #141948)
Matt Arsenault via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu May 29 12:57:58 PDT 2025
================
@@ -704,8 +704,29 @@ static bool intrinsicHasPackedVectorBenefit(Intrinsic::ID ID) {
InstructionCost
GCNTTIImpl::getIntrinsicInstrCost(const IntrinsicCostAttributes &ICA,
TTI::TargetCostKind CostKind) const {
- if (ICA.getID() == Intrinsic::fabs)
+ switch (ICA.getID()) {
+ case Intrinsic::fabs:
+ // Free source modifier in the common case.
+ return 0;
+ case Intrinsic::amdgcn_workitem_id_x:
+ case Intrinsic::amdgcn_workitem_id_y:
+ case Intrinsic::amdgcn_workitem_id_z:
+ // TODO: If hasPackedTID, or if the calling context is not an entry point
----------------
arsenm wrote:
Similarly also can't check if the other work items are disabled
https://github.com/llvm/llvm-project/pull/141948
More information about the llvm-branch-commits
mailing list