-
Notifications
You must be signed in to change notification settings - Fork 13.6k
[llvm] fix few copypaste typos #119881
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
base: main
Are you sure you want to change the base?
[llvm] fix few copypaste typos #119881
Conversation
@llvm/pr-subscribers-llvm-transforms @llvm/pr-subscribers-backend-aarch64 Author: klensy (klensy) ChangesThis looks like typos, but i don't understand code enough to be sure if it requires more fixes or not. Full diff: https://github.com/llvm/llvm-project/pull/119881.diff 3 Files Affected:
diff --git a/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp b/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
index 41e0214dab6c73..26a44904da92dc 100644
--- a/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+++ b/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
@@ -18365,7 +18365,7 @@ static SDValue performUADDVAddCombine(SDValue A, SelectionDAG &DAG) {
EVT VT = A.getValueType();
SDValue Op0 = A.getOperand(0);
SDValue Op1 = A.getOperand(1);
- if (Op0.getOpcode() != Op0.getOpcode() ||
+ if (Op0.getOpcode() != Op1.getOpcode() ||
(Op0.getOpcode() != ISD::ZERO_EXTEND &&
Op0.getOpcode() != ISD::SIGN_EXTEND))
return SDValue();
diff --git a/llvm/lib/Transforms/Scalar/JumpThreading.cpp b/llvm/lib/Transforms/Scalar/JumpThreading.cpp
index 16110cd25bc61c..e85b6e7f931785 100644
--- a/llvm/lib/Transforms/Scalar/JumpThreading.cpp
+++ b/llvm/lib/Transforms/Scalar/JumpThreading.cpp
@@ -2516,7 +2516,7 @@ void JumpThreadingPass::updateBlockFreqAndEdgeWeight(BasicBlock *PredBB,
BlockFrequencyInfo *BFI,
BranchProbabilityInfo *BPI,
bool HasProfile) {
- assert(((BFI && BPI) || (!BFI && !BFI)) &&
+ assert(((BFI && BPI) || (!BFI && !BPI)) &&
"Both BFI & BPI should either be set or unset");
if (!BFI) {
diff --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
index 0e11e8704db2f2..78a2de77c7fbae 100644
--- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -13858,7 +13858,7 @@ class BoUpSLP::ShuffleInstructionBuilder final : public BaseShuffleAnalysis {
Value *createShuffleVector(Value *V1, Value *V2, ArrayRef<int> Mask) {
if (V1->getType() != V2->getType()) {
assert(V1->getType()->isIntOrIntVectorTy() &&
- V1->getType()->isIntOrIntVectorTy() &&
+ V2->getType()->isIntOrIntVectorTy() &&
"Expected integer vector types only.");
if (V1->getType() != V2->getType()) {
if (cast<VectorType>(V2->getType())
|
@@ -13858,7 +13858,7 @@ class BoUpSLP::ShuffleInstructionBuilder final : public BaseShuffleAnalysis { | |||
Value *createShuffleVector(Value *V1, Value *V2, ArrayRef<int> Mask) { | |||
if (V1->getType() != V2->getType()) { | |||
assert(V1->getType()->isIntOrIntVectorTy() && | |||
V1->getType()->isIntOrIntVectorTy() && | |||
V2->getType()->isIntOrIntVectorTy() && | |||
"Expected integer vector types only."); | |||
if (V1->getType() != V2->getType()) { |
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.
This condition the same as outer if, should it be removed?
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.
Yes, should be removed
llvm/test/Transforms/JumpThreading/select.ll test fails after change in JumpThreading.cpp, how should i change test? |
Oh, there was already attempt in #95715, but pr stuck |
The AArch64 part certainly does look wrong. We should add a test case and probably separate that out into a different review, to separate the different issues. Are you OK to do that, or are you happy for me to put it together? Here's a test I came up with for it:
|
Reverse ping. |
This looks like typos, but i don't understand code enough to be sure if it requires more fixes or not.