[llvm] [InstCombine] Thwart complexity-based canonicalization in shl-add test (NFC) (PR #91413)
via llvm-commits
llvm-commits at lists.llvm.org
Tue May 7 17:50:17 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-transforms
Author: AtariDreams (AtariDreams)
<details>
<summary>Changes</summary>
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
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
``````````
</details>
https://github.com/llvm/llvm-project/pull/91413
More information about the llvm-commits
mailing list