-
Notifications
You must be signed in to change notification settings - Fork 14.9k
Add support for flag output operand "=@cc" for SystemZ. #125970
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 28 commits
Commits
Show all changes
53 commits
Select commit
Hold shift + click to select a range
8a07b3d
Add support for flag output operand "=@cc" for SystemZ and optimizing…
anoopkg6 d3f3c03
Removed triple check in CGStmt.cpp and using StringRef in SystemZ.h.
062e03a
clang test causing pr build failure.
5aef564
Add Preprocessor test for flag output operand and some cleanup for c …
f10e46b
Merge branch 'main' into asm_llvm
anoopkg6 2ab7a75
Fixed clang outputting extra byte '\7F' in clang test and fix a warni…
132cf31
Merge branch 'asm_llvm' of github.com:anoopkg6/llvm-project into asm_…
fccc70e
Incorporated suggestions in review.
7ea0c5f
- Changes relating to ConstraintInfo for setting flag output CC upper…
d787c8b
Incorporated changes for code review feedback.
82a26f7
Merge branch 'main' into asm_llvm
anoopkg6 c5c34d3
Added pattern for XOR, OR, TM, AND, ICMP to PerformDAGCombine and sim…
0dc6995
Incorporated code review feedback.
e2467a6
Incorporated code review feedback.
44f2b5d
Incorporated code review feedback.
12cc13c
Incorporated code review feedback.
956c53c
Merge branch 'main' into asm_llvm
anoopkg6 557113f
1. Incorporated code review feedback.
78cdca5
Eliminated combinedOR/combineXOR/combineAND altogether and collapsed …
2ce4915
Incorporated code review changes for combineLogicalOpCCMask, which ma…
714682f
Merge branch 'llvm:main' into asm_llvm
anoopkg6 9d5d4eb
1. Implement SDValue simplifyAssumingCCVal to evaluate Val under the …
28c92f4
Merge branch 'llvm:main' into asm_llvm
anoopkg6 140bd6a
1. Return array of SDValue from simplifyAssumingCCVal and remove use of
c13c7d7
Fix Windows build failure because of __builtin_clz.
86abe9b
1. Remove converting SDValue into int, rather operate via embedded AP…
1915eb8
Incorporate code review suggestions.
85d1590
Merge branch 'llvm:main' into asm_llvm
anoopkg6 b04a070
Merge branch 'llvm:main' into asm_llvm
anoopkg6 d4ce3c0
Incorporate code review feedback.
7fcaafe
Merge branch 'asm_llvm' of github.com:anoopkg6/llvm-project into asm_…
1dcf4c9
Merge branch 'llvm:main' into asm_llvm
anoopkg6 69f8f25
Merge branch 'llvm:main' into asm_llvm
anoopkg6 e2f03da
Making flag output operand infrastructure more generic as output oper…
365de38
Merge branch 'llvm:main' into asm_llvm
anoopkg6 a481934
1. Use std::optional<std::pair<unsigned, unsigned>> for getOutputoper…
f058cc8
Merge branch 'llvm:main' into asm_llvm
anoopkg6 10c60fa
1. Added some comments.
4ad8f4d
1. Moved getCCResult above SystemZTargetLowering::LowerAsmOutputForCo…
faa910e
Add initial version of IL tests for flag output operand.
c7d191b
Merge branch 'llvm:main' into asm_llvm
anoopkg6 2887d4d
Merge branch 'asm_llvm' of github.com:anoopkg6/llvm-project into asm_…
307ff6f
Add clang tests for flag output operand.
092a78a
Auto-generate checks for clang test using update_cc_test_checks.py.
6174bb6
Merge branch 'llvm:main' into asm_llvm
anoopkg6 2b3c344
Merge branch 'llvm:main' into asm_llvm
anoopkg6 263b402
1. Optimize the cases where select_ccmask has TrueVal/FalseVal as tem…
7078f8c
Merge branch 'llvm:main' into asm_llvm
anoopkg6 3a28826
Combine select_ccmask nodes with no-const TrueVal/FalseVal and same C…
ef554e8
Merge branch 'llvm:main' into asm_llvm
anoopkg6 bf1b063
Incorporate minor code review feedbak.
c095cee
Merge branch 'llvm:main' into asm_llvm
anoopkg6 64a432f
Merge branch 'main' into asm_llvm
uweigand 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
Some comments aren't visible on the classic Files Changed page.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// RUN: %clang_cc1 -O2 -triple s390x-linux -emit-llvm -o - %s | FileCheck %s | ||
|
||
int foo_012(int x) { | ||
// CHECK-LABEL: @foo_012 | ||
// CHECK: = tail call { i32, i32 } asm "ahi $0,42\0A", "=d,={@cc},0"(i32 %x) | ||
int cc; | ||
asm ("ahi %[x],42\n" : [x] "+d"(x), "=@cc" (cc)); | ||
return cc == 0 || cc == 1 || cc == 2 ? 42 : 0; | ||
uweigand marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
} | ||
|
||
int foo_013(int x) { | ||
// CHECK-LABEL: @foo_013 | ||
// CHECK: = tail call { i32, i32 } asm "ahi $0,42\0A", "=d,={@cc},0"(i32 %x) | ||
int cc; | ||
asm ("ahi %[x],42\n" : [x] "+d"(x), "=@cc" (cc)); | ||
return cc == 0 || cc == 1 || cc == 3 ? 42 : 0; | ||
} | ||
uweigand marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
int foo_023(int x) { | ||
// CHECK-LABEL: @foo_023 | ||
// CHECK: = tail call { i32, i32 } asm "ahi $0,42\0A", "=d,={@cc},0"(i32 %x) | ||
int cc; | ||
asm ("ahi %[x],42\n" : [x] "+d"(x), "=@cc" (cc)); | ||
return cc == 0 || cc == 2 || cc == 3 ? 42 : 0; | ||
} | ||
|
||
int foo_123(int x) { | ||
// CHECK-LABEL: @foo_123 | ||
// CHECK: = tail call { i32, i32 } asm "ahi $0,42\0A", "=d,={@cc},0"(i32 %x) | ||
int cc; | ||
asm ("ahi %[x],42\n" : [x] "+d"(x), "=@cc" (cc)); | ||
return cc == 1 || cc == 2 || cc == 3 ? 42 : 0; | ||
} |
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,4 @@ | ||
// RUN: %clang -target systemz-unknown-unknown -x c -E -dM -o - %s | FileCheck -match-full-lines %s | ||
uweigand marked this conversation as resolved.
Show resolved
Hide resolved
|
||
// RUN: %clang -target s390x-unknown-unknown -x c -E -dM -o - %s | FileCheck -match-full-lines %s | ||
|
||
// CHECK: #define __GCC_ASM_FLAG_OUTPUTS__ 1 |
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.
Uh oh!
There was an error while loading. Please reload this page.