-
Couldn't load subscription status.
- Fork 15k
[GlobalISel] Add G_ABS computeKnownBits #154413
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
Merged
Changes from 13 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
519caea
[GlobalISel] Add G_ABS computeKnownBits
r41k0u 237f996
[GlobalISel] Add more tests for G_ABS computeKnownBits
r41k0u 6fe08a8
[GlobalISel] Add cache assertion and clearing to GISelValueTracking::…
r41k0u 7898992
[GlobalISel] Add sign extension tests for knownbits_abs, update tests
r41k0u 90c15e8
[GlobalISel] Fix formatting in GISelValueTrackingPrinterPass::run
r41k0u 4973773
[GlobalIsel] Add computeNumSignBitsImpl to GISelValueTracking
r41k0u 1a5237c
[GlobalISel] Update aarch64-smull.ll test
r41k0u b1fa17d
[GlobalISel] Replace relevant occurences of computeNumSignBits to com…
r41k0u 6729b0f
[GlobalISel] Fix depth for calling computeKnownBitsImpl in computeNum…
r41k0u bcd8393
[GlobalISel] clang-format
r41k0u 7e84ad1
[GlobalISel] Replace getKnownBits with its Impl in getValidShiftAmoun…
r41k0u a185946
[GlobalISel] Remove workarounds for cache assertion while adding G_AB…
r41k0u 66cf46f
[GlobalISel] clang-format
r41k0u 7e0073d
[GlobalISel] Update AMDGPU tests for G_ABS KnownBits tracking
r41k0u 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
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,83 @@ | ||
| # NOTE: Assertions have been autogenerated by utils/update_givaluetracking_test_checks.py UTC_ARGS: --version 5 | ||
| # RUN: llc -mtriple=aarch64 -passes='print<gisel-value-tracking>' -filetype=null %s 2>&1 | FileCheck %s | ||
|
|
||
| --- | ||
| name: Cst | ||
| body: | | ||
| bb.0: | ||
| ; CHECK-LABEL: name: @Cst | ||
| ; CHECK-NEXT: %0:_ KnownBits:00010011 SignBits:3 | ||
| ; CHECK-NEXT: %1:_ KnownBits:00010011 SignBits:3 | ||
| %0:_(s8) = G_CONSTANT i8 19 | ||
| %1:_(s8) = G_ABS %0 | ||
| ... | ||
| --- | ||
| name: CstNeg | ||
| body: | | ||
| bb.0: | ||
| ; CHECK-LABEL: name: @CstNeg | ||
| ; CHECK-NEXT: %0:_ KnownBits:11101110 SignBits:3 | ||
| ; CHECK-NEXT: %1:_ KnownBits:00010010 SignBits:3 | ||
| %0:_(s8) = G_CONSTANT i8 238 | ||
| %1:_(s8) = G_ABS %0 | ||
| ... | ||
r41k0u marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| --- | ||
| name: SplatVecCst | ||
| body: | | ||
| bb.0: | ||
| ; CHECK-LABEL: name: @SplatVecCst | ||
| ; CHECK-NEXT: %0:_ KnownBits:11111010 SignBits:5 | ||
| ; CHECK-NEXT: %1:_ KnownBits:11111010 SignBits:5 | ||
| ; CHECK-NEXT: %2:_ KnownBits:00000110 SignBits:5 | ||
| %0:_(s8) = G_CONSTANT i8 250 | ||
| %1:_(<vscale x 16 x s8>) = G_SPLAT_VECTOR %0(s8) | ||
| %2:_(<vscale x 16 x s8>) = G_ABS %1 | ||
| ... | ||
| --- | ||
| name: VecCst | ||
| body: | | ||
| bb.0: | ||
| ; CHECK-LABEL: name: @VecCst | ||
| ; CHECK-NEXT: %0:_ KnownBits:00011001 SignBits:3 | ||
| ; CHECK-NEXT: %1:_ KnownBits:11100001 SignBits:3 | ||
| ; CHECK-NEXT: %2:_ KnownBits:?????001 SignBits:3 | ||
| ; CHECK-NEXT: %3:_ KnownBits:00?????1 SignBits:2 | ||
| %0:_(s8) = G_CONSTANT i8 25 | ||
| %1:_(s8) = G_CONSTANT i8 225 | ||
| %2:_(<2 x s8>) = G_BUILD_VECTOR %0:_(s8), %1:_(s8) | ||
| %3:_(<2 x s8>) = G_ABS %2 | ||
| ... | ||
| --- | ||
| name: ImplicitDef | ||
| body: | | ||
| bb.0: | ||
| ; CHECK-LABEL: name: @ImplicitDef | ||
| ; CHECK-NEXT: %0:_ KnownBits:???????? SignBits:1 | ||
| ; CHECK-NEXT: %1:_ KnownBits:???????? SignBits:1 | ||
| %0:_(s8) = G_IMPLICIT_DEF | ||
| %1:_(s8) = G_ABS %0 | ||
| ... | ||
| --- | ||
| name: CstSext | ||
| body: | | ||
| bb.0: | ||
| ; CHECK-LABEL: name: @CstSext | ||
| ; CHECK-NEXT: %0:_ KnownBits:11000111 SignBits:2 | ||
| ; CHECK-NEXT: %1:_ KnownBits:1111111111000111 SignBits:10 | ||
| ; CHECK-NEXT: %2:_ KnownBits:0000000000111001 SignBits:10 | ||
| %0:_(s8) = G_CONSTANT i8 199 | ||
| %1:_(s16) = G_SEXT %0 | ||
| %2:_(s16) = G_ABS %1 | ||
| ... | ||
| --- | ||
| name: ImplicitDefSext | ||
| body: | | ||
| bb.0: | ||
| ; CHECK-LABEL: name: @ImplicitDefSext | ||
| ; CHECK-NEXT: %0:_ KnownBits:???????? SignBits:1 | ||
| ; CHECK-NEXT: %1:_ KnownBits:???????????????? SignBits:9 | ||
| ; CHECK-NEXT: %2:_ KnownBits:00000000???????? SignBits:8 | ||
| %0:_(s8) = G_IMPLICIT_DEF | ||
| %1:_(s16) = G_SEXT %0 | ||
| %2:_(s16) = G_ABS %1 | ||
| ... | ||
Oops, something went wrong.
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.