- Notifications
You must be signed in to change notification settings - Fork 15.3k
[DAGCombine] Propagate truncate to operands #98666
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
Closed
Closed
Changes from all commits
Commits
Show all changes
65 commits Select commit Hold shift + click to select a range
aec2e4f Initial commit
justinfargnoli 33efd19 Prefer early return
justinfargnoli c557840 clang-format
justinfargnoli 7212420 Add negative test for `ISD::TRUNCATE`
justinfargnoli 01ad890 Add cvt and cvt_not test
justinfargnoli a015d23 Prefer early return
justinfargnoli 18bc242 clang-format
justinfargnoli 04f1ec4 Correct trunc_cvt_not test
justinfargnoli 289fd4b Delete NVPTXISelLowering implementation
justinfargnoli f9b01f1 Perform optimziation via DAGCombine + TLI
justinfargnoli e6b2e1e Update variadics-backend.ll
justinfargnoli 4d1cc02 Save work
justinfargnoli 8f5a351 Modify boolean-patterns.ll
justinfargnoli 7cc72b3 Revert "Save work"
justinfargnoli 0d44023 Save work
justinfargnoli f0777f3 Remove improper TLI use
justinfargnoli 6d603cf Remove white space
justinfargnoli e5be174 clang-format
justinfargnoli 058c35e Implement transform in DAG combine
justinfargnoli 3ea5867 Save work
justinfargnoli b2afe79 Remove isTruncateFree
justinfargnoli 04ae5d4 Use ptr in test
justinfargnoli 830442a Only run on free truncs
justinfargnoli 401c847 Add comment
justinfargnoli 6bec31d clang-format
justinfargnoli bf0620d explcitly mentino GPU in comment
justinfargnoli 3e7aa00 clang-format
justinfargnoli e8046cb Add comment to TLI function
justinfargnoli 0d58daf clang-format
justinfargnoli 09b2394 Update boolean-patterns.ll
justinfargnoli 30c5993 Use isNarrowingProfitable instead of shouldReduceRegisterPressure
justinfargnoli 9cd0dee clang-format
justinfargnoli efff174 Update tests
justinfargnoli 0c33486 Update more tests
justinfargnoli 41df970 Update even more tests
justinfargnoli b1eb61a Narrowing vectors isn't profitable | Update an extraordinary number o…
justinfargnoli 939885f Changes with additional mov instructions
justinfargnoli f0f4ad0 Changes with non-trivial diffs
justinfargnoli 3767c76 Changes with a higher instruction count
justinfargnoli eef0dbc Non-trivial diff
justinfargnoli 4d804df Prefer readable condition
justinfargnoli 6c2ae42 Update 2 X86 tests that I missed
justinfargnoli e3f8d9f Update register names for NVPTX/boolean-patterns.ll
justinfargnoli 13edcaa Move isTypeLegal condition up
justinfargnoli a52b459 Update AMDGPU/computeNumSignBits-mul.ll
justinfargnoli 06a0e68 Address comment
justinfargnoli 401bb07 Prevent infinite loop by checking TLI.IsDesirableToPromoteOp()
justinfargnoli d887b68 Fixup previous commit
justinfargnoli 5811e11 clang-format
justinfargnoli 0e931f3 Use new isNarrowingProfitable API
justinfargnoli 281f897 Update tests on ToT
justinfargnoli f1fee8e Update NVPTX isNarrowingProfitable API
justinfargnoli 47fadcd Update AMDGPU tests
justinfargnoli 9ed8f93 Pass the correct SDNode to isNarrowingProfitable in DAGCombiner
justinfargnoli 2aa5bbc Update AMDGPU tests
justinfargnoli 2f9995f Update amdgpu-codegenprepare-idiv.ll
justinfargnoli 1d681b9 Update NVPTX tests
justinfargnoli bbf1635 Address comments
justinfargnoli a6c2465 [AMDGPU] Cleanup xor.ll
justinfargnoli 7f5bd91 [AMDGPU] revert xor.ll si-annotate-cf.ll changes
justinfargnoli 5ab861f [AMDGPU] Revert and.ll changes
justinfargnoli 6dfabf6 [AMDGPU] It's not profitable to narrow to i1
justinfargnoli d3b68b1 Fix rebase
justinfargnoli 53965f2 Fix AMD infinite loop
justinfargnoli 99da17d Update tests
justinfargnoli 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 |
|---|---|---|
| | @@ -1040,6 +1040,8 @@ bool AMDGPUTargetLowering::isNarrowingProfitable(SDNode *N, EVT SrcVT, | |
| case ISD::MUL: | ||
| case ISD::SETCC: | ||
| case ISD::SELECT: | ||
| if (DestVT.getScalarSizeInBits() == 1) | ||
| Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. getScalarType() == i1 | ||
| return false; | ||
| if (Subtarget->has16BitInsts() && | ||
| (!DestVT.isVector() || !Subtarget->hasVOP3PInsts())) { | ||
| // Don't narrow back down to i16 if promoted to i32 already. | ||
| | ||
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needing to speculatively create some nodes in case it's profitable is unfortunate, is there a way to avoid this