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

[InstCombine] Thwart complexity-based canonicalization in shl-add test (NFC) #91413

Merged
merged 1 commit into from
May 9, 2024

Conversation

AZero13
Copy link
Contributor

@AZero13 AZero13 commented May 8, 2024

Fixed test for #88193

@llvmbot
Copy link
Member

llvmbot commented May 8, 2024

@llvm/pr-subscribers-llvm-transforms

Author: AtariDreams (AtariDreams)

Changes

Extra test for #88193


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

1 Files Affected:

  • (modified) llvm/test/Transforms/InstCombine/lshr.ll (+1)
diff --git a/llvm/test/Transforms/InstCombine/lshr.ll b/llvm/test/Transforms/InstCombine/lshr.ll
index 563e669f90353..25e89c91a9e55 100644
--- a/llvm/test/Transforms/InstCombine/lshr.ll
+++ b/llvm/test/Transforms/InstCombine/lshr.ll
@@ -402,6 +402,7 @@ define i32 @shl_add_lshr_comm(i32 %x, i32 %c, i32 %y) {
 ; CHECK-NEXT:    ret i32 [[LSHR]]
 ;
   %shl = shl nuw i32 %x, %c
+  %xx = mul i32 %x, %x ; thwart complexity-based canonicalization
   %add = add nuw i32 %y, %shl
   %lshr = lshr i32 %add, %c
   ret i32 %lshr

@AZero13 AZero13 force-pushed the communinative-test branch 2 times, most recently from 3c28a12 to 22a5f12 Compare May 8, 2024 00:56
@AZero13 AZero13 requested a review from nikic as a code owner May 8, 2024 01:01
@AZero13 AZero13 force-pushed the communinative-test branch from 0f7c8b8 to a434859 Compare May 8, 2024 01:02
@AZero13 AZero13 force-pushed the communinative-test branch from a434859 to fcb3c4c Compare May 8, 2024 01:03
@AZero13
Copy link
Contributor Author

AZero13 commented May 8, 2024

This should be good now...

@nikic nikic merged commit ba5170f into llvm:main May 9, 2024
4 checks passed
@AZero13 AZero13 deleted the communinative-test branch May 9, 2024 12:03
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.

3 participants