-
Notifications
You must be signed in to change notification settings - Fork 15.2k
[SelectionDAG] Add SDTCisInt<1> to SDTVecReduce and SDTCisEltOfVec to SDTFPVecReduce. NFC #162761
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
Conversation
|
@llvm/pr-subscribers-llvm-selectiondag Author: Craig Topper (topperc) ChangesFull diff: https://github.com/llvm/llvm-project/pull/162761.diff 1 Files Affected:
diff --git a/llvm/include/llvm/Target/TargetSelectionDAG.td b/llvm/include/llvm/Target/TargetSelectionDAG.td
index 7bc90d4428800..5f4f8c391c489 100644
--- a/llvm/include/llvm/Target/TargetSelectionDAG.td
+++ b/llvm/include/llvm/Target/TargetSelectionDAG.td
@@ -300,10 +300,10 @@ def SDTVecInsert : SDTypeProfile<1, 3, [ // vector insert
SDTCisEltOfVec<2, 1>, SDTCisSameAs<0, 1>, SDTCisPtrTy<3>
]>;
def SDTVecReduce : SDTypeProfile<1, 1, [ // vector reduction
- SDTCisInt<0>, SDTCisVec<1>
+ SDTCisInt<0>, SDTCisVec<1>, SDTCisInt<1>
]>;
def SDTFPVecReduce : SDTypeProfile<1, 1, [ // FP vector reduction
- SDTCisFP<0>, SDTCisVec<1>
+ SDTCisFP<0>, SDTCisVec<1>, SDTCisFP<1>
]>;
def SDTVecReverse : SDTypeProfile<1, 1, [ // vector reverse
|
s-barannikov
left a comment
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.
LGTM
| ]>; | ||
| def SDTFPVecReduce : SDTypeProfile<1, 1, [ // FP vector reduction | ||
| SDTCisFP<0>, SDTCisVec<1> | ||
| SDTCisFP<0>, SDTCisVec<1>, SDTCisFP<1> |
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.
Can this be:
| SDTCisFP<0>, SDTCisVec<1>, SDTCisFP<1> | |
| SDTCisEltOfVec<0, 1>, SDTCisVec<1>, SDTCisFP<1> |
Corresponding LLVM intrinsics require the result type to match the source element type, but I don't know if this is still a requirement in SDAG.
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.
It might be a requirement in SelectionDAG for FP but not int.
… SDTFPVecReduce. NFC (llvm#162761)
… SDTFPVecReduce. NFC (llvm#162761)
No description provided.