Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AMDGPU: Reduce AddedComplexity on canonicalize pattern #119796

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

arsenm
Copy link
Contributor

@arsenm arsenm commented Dec 13, 2024

Pick the minimum complexity required for tests to pass instead of
a giant debug value of 1000.

…atterns

Positively boost the 2 operand forms instead.
Pick the minimum complexity required for tests to pass instead of
a giant debug value of 1000.
Copy link
Contributor Author

arsenm commented Dec 13, 2024

@llvmbot
Copy link
Member

llvmbot commented Dec 13, 2024

@llvm/pr-subscribers-backend-amdgpu

Author: Matt Arsenault (arsenm)

Changes

Pick the minimum complexity required for tests to pass instead of
a giant debug value of 1000.


Full diff: https://github.com/llvm/llvm-project/pull/119796.diff

1 Files Affected:

  • (modified) llvm/lib/Target/AMDGPU/SIInstructions.td (+1-1)
diff --git a/llvm/lib/Target/AMDGPU/SIInstructions.td b/llvm/lib/Target/AMDGPU/SIInstructions.td
index bc25d75131cc35..9bd04b939c8a55 100644
--- a/llvm/lib/Target/AMDGPU/SIInstructions.td
+++ b/llvm/lib/Target/AMDGPU/SIInstructions.td
@@ -3055,7 +3055,7 @@ def : GCNPat<
    (V_BFREV_B32_e64 (i32 (EXTRACT_SUBREG VReg_64:$a, sub0))), sub1)>;
 
 // If fcanonicalize's operand is implicitly canonicalized, we only need a copy.
-let AddedComplexity = 1000 in {
+let AddedComplexity = 8 in {
 foreach vt = [f16, v2f16, f32, v2f32, f64] in {
   def : GCNPat<
     (fcanonicalize (vt is_canonicalized:$src)),

Base automatically changed from users/arsenm/gfx950/avoid-negative-added-complexity-fmaximum3-patterns to main December 13, 2024 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants