-
Notifications
You must be signed in to change notification settings - Fork 15k
[LLVM][ConstProp] Enable intrinsic simplifications for vector ConstantInt based operands. #159358
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
Merged
paulwalker-arm
merged 5 commits into
llvm:main
from
paulwalker-arm:vector-constants-simplify-intrinsics
Oct 17, 2025
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
05854a4
Update tests to show the affect of using vector ConstantInts.
paulwalker-arm 8bf7932
[LLVM][ConstProp] Enable intrinsic simplifications for vector Constan…
paulwalker-arm d42572c
Reduce number of isa<Constant...> tests.
paulwalker-arm be532d2
constantFoldVectorReduce: Protect against nullptr across all elements.
paulwalker-arm 72ada20
Remove constant class restriction from wasm.alltrue constant fold.
paulwalker-arm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
llvm/test/Transforms/InstSimplify/ConstProp/WebAssembly/any_all_true.ll
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 6 | ||
| ; RUN: opt < %s -passes=instsimplify -S | FileCheck %s | ||
| ; RUN: opt < %s -passes=instsimplify -use-constant-int-for-fixed-length-splat -use-constant-int-for-scalable-splat -S | FileCheck %s | ||
|
|
||
| define i16 @W() { | ||
| ; CHECK-LABEL: define i16 @W() { | ||
| ; CHECK-NEXT: ret i16 -32768 | ||
| ; | ||
| %Z = call i16 @llvm.bitreverse.i16(i16 1) | ||
| ret i16 %Z | ||
| } | ||
|
|
||
| define i32 @X() { | ||
| ; CHECK-LABEL: define i32 @X() { | ||
| ; CHECK-NEXT: ret i32 -2147483648 | ||
| ; | ||
| %Z = call i32 @llvm.bitreverse.i32(i32 1) | ||
| ret i32 %Z | ||
| } | ||
|
|
||
| define i64 @Y() { | ||
| ; CHECK-LABEL: define i64 @Y() { | ||
| ; CHECK-NEXT: ret i64 -9223372036854775808 | ||
| ; | ||
| %Z = call i64 @llvm.bitreverse.i64(i64 1) | ||
| ret i64 %Z | ||
| } | ||
|
|
||
| define i80 @Z() { | ||
| ; CHECK-LABEL: define i80 @Z() { | ||
| ; CHECK-NEXT: ret i80 23777929115895377691656 | ||
| ; | ||
| %Z = call i80 @llvm.bitreverse.i80(i80 76151636403560493650080) | ||
| ret i80 %Z | ||
| } | ||
|
|
||
| define <4 x i32> @bitreverse_splat_v4i32() { | ||
| ; CHECK-LABEL: define <4 x i32> @bitreverse_splat_v4i32() { | ||
| ; CHECK-NEXT: ret <4 x i32> splat (i32 -2147483648) | ||
| ; | ||
| %Z = call <4 x i32> @llvm.bitreverse.v4i32(<4 x i32> splat(i32 1)) | ||
| ret <4 x i32> %Z | ||
| } | ||
|
|
||
| define <vscale x 4 x i32> @bitreverse_splat_nxv4i32() { | ||
| ; CHECK-LABEL: define <vscale x 4 x i32> @bitreverse_splat_nxv4i32() { | ||
| ; CHECK-NEXT: ret <vscale x 4 x i32> splat (i32 -2147483648) | ||
| ; | ||
| %Z = call <vscale x 4 x i32> @llvm.bitreverse.v4i32(<vscale x 4 x i32> splat(i32 1)) | ||
| ret <vscale x 4 x i32> %Z | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.