-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
AMDGPU: Add disjoint to or produced from lowering vector ops #122424
AMDGPU: Add disjoint to or produced from lowering vector ops #122424
Conversation
@llvm/pr-subscribers-backend-amdgpu Author: Matt Arsenault (arsenm) ChangesFull diff: https://github.com/llvm/llvm-project/pull/122424.diff 1 Files Affected:
diff --git a/llvm/lib/Target/AMDGPU/SIISelLowering.cpp b/llvm/lib/Target/AMDGPU/SIISelLowering.cpp
index 992f7ed99d3bb7..5a7ff81e08064e 100644
--- a/llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+++ b/llvm/lib/Target/AMDGPU/SIISelLowering.cpp
@@ -7429,7 +7429,8 @@ SDValue SITargetLowering::lowerINSERT_VECTOR_ELT(SDValue Op,
DAG.getNode(ISD::AND, SL, IntVT, DAG.getNOT(SL, BFM, IntVT), BCVec);
// 4. Get (2) and (3) ORed into the target vector.
- SDValue BFI = DAG.getNode(ISD::OR, SL, IntVT, LHS, RHS);
+ SDValue BFI =
+ DAG.getNode(ISD::OR, SL, IntVT, LHS, RHS, SDNodeFlags::Disjoint);
return DAG.getNode(ISD::BITCAST, SL, VecVT, BFI);
}
@@ -7637,7 +7638,8 @@ SDValue SITargetLowering::lowerBUILD_VECTOR(SDValue Op,
Lo = DAG.getNode(ISD::BITCAST, SL, MVT::i16, Lo);
Lo = DAG.getNode(ISD::ZERO_EXTEND, SL, MVT::i32, Lo);
- SDValue Or = DAG.getNode(ISD::OR, SL, MVT::i32, Lo, ShlHi);
+ SDValue Or =
+ DAG.getNode(ISD::OR, SL, MVT::i32, Lo, ShlHi, SDNodeFlags::Disjoint);
return DAG.getNode(ISD::BITCAST, SL, VT, Or);
}
|
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.
Makes sense to me.
surprised that no test change is needed |
It's not surprising, this rarely does anything. The only times it's really useful is when the or appears in an addressing expression, which won't really appear as a user of a vector expansion |
No description provided.