diff options
Diffstat (limited to 'llvm/lib')
6 files changed, 20 insertions, 20 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp b/llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp index a2567d1039c..f5db8531d3a 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp +++ b/llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp @@ -1041,7 +1041,7 @@ Instruction *InstCombiner::visitAdd(BinaryOperator &I) { if (SimplifyAssociativeOrCommutative(I)) return &I; - if (Instruction *X = foldShuffledBinop(I)) + if (Instruction *X = foldVectorBinop(I)) return X; // (A*B)+(A*C) -> A*(B+C) etc @@ -1276,7 +1276,7 @@ Instruction *InstCombiner::visitFAdd(BinaryOperator &I) { if (SimplifyAssociativeOrCommutative(I)) return &I; - if (Instruction *X = foldShuffledBinop(I)) + if (Instruction *X = foldVectorBinop(I)) return X; if (Instruction *FoldedFAdd = foldBinOpIntoSelectOrPhi(I)) @@ -1455,7 +1455,7 @@ Instruction *InstCombiner::visitSub(BinaryOperator &I) { SQ.getWithInstruction(&I))) return replaceInstUsesWith(I, V); - if (Instruction *X = foldShuffledBinop(I)) + if (Instruction *X = foldVectorBinop(I)) return X; // (A*B)-(A*C) -> A*(B-C) etc @@ -1752,7 +1752,7 @@ Instruction *InstCombiner::visitFSub(BinaryOperator &I) { SQ.getWithInstruction(&I))) return replaceInstUsesWith(I, V); - if (Instruction *X = foldShuffledBinop(I)) + if (Instruction *X = foldVectorBinop(I)) return X; // Subtraction from -0.0 is the canonical form of fneg. diff --git a/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp b/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp index 898063871ac..a6280ec95a9 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp +++ b/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp @@ -1535,7 +1535,7 @@ Instruction *InstCombiner::visitAnd(BinaryOperator &I) { if (SimplifyAssociativeOrCommutative(I)) return &I; - if (Instruction *X = foldShuffledBinop(I)) + if (Instruction *X = foldVectorBinop(I)) return X; // See if we can simplify any instructions used by the instruction whose sole @@ -2134,7 +2134,7 @@ Instruction *InstCombiner::visitOr(BinaryOperator &I) { if (SimplifyAssociativeOrCommutative(I)) return &I; - if (Instruction *X = foldShuffledBinop(I)) + if (Instruction *X = foldVectorBinop(I)) return X; // See if we can simplify any instructions used by the instruction whose sole @@ -2602,7 +2602,7 @@ Instruction *InstCombiner::visitXor(BinaryOperator &I) { if (SimplifyAssociativeOrCommutative(I)) return &I; - if (Instruction *X = foldShuffledBinop(I)) + if (Instruction *X = foldVectorBinop(I)) return X; if (Instruction *NewXor = foldXorToXor(I, Builder)) diff --git a/llvm/lib/Transforms/InstCombine/InstCombineInternal.h b/llvm/lib/Transforms/InstCombine/InstCombineInternal.h index 951fc22a913..46c598d4bfb 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineInternal.h +++ b/llvm/lib/Transforms/InstCombine/InstCombineInternal.h @@ -805,7 +805,7 @@ private: APInt &UndefElts, unsigned Depth = 0); /// Canonicalize the position of binops relative to shufflevector. - Instruction *foldShuffledBinop(BinaryOperator &Inst); + Instruction *foldVectorBinop(BinaryOperator &Inst); /// Given a binary operator, cast instruction, or select which has a PHI node /// as operand #0, see if we can fold the instruction into the PHI (which is diff --git a/llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp b/llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp index d76351fc6fb..f99dba49cb5 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp +++ b/llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp @@ -133,7 +133,7 @@ Instruction *InstCombiner::visitMul(BinaryOperator &I) { if (SimplifyAssociativeOrCommutative(I)) return &I; - if (Instruction *X = foldShuffledBinop(I)) + if (Instruction *X = foldVectorBinop(I)) return X; if (Value *V = SimplifyUsingDistributiveLaws(I)) @@ -348,7 +348,7 @@ Instruction *InstCombiner::visitFMul(BinaryOperator &I) { if (SimplifyAssociativeOrCommutative(I)) return &I; - if (Instruction *X = foldShuffledBinop(I)) + if (Instruction *X = foldVectorBinop(I)) return X; if (Instruction *FoldedMul = foldBinOpIntoSelectOrPhi(I)) @@ -863,7 +863,7 @@ Instruction *InstCombiner::visitUDiv(BinaryOperator &I) { SQ.getWithInstruction(&I))) return replaceInstUsesWith(I, V); - if (Instruction *X = foldShuffledBinop(I)) + if (Instruction *X = foldVectorBinop(I)) return X; // Handle the integer div common cases @@ -957,7 +957,7 @@ Instruction *InstCombiner::visitSDiv(BinaryOperator &I) { SQ.getWithInstruction(&I))) return replaceInstUsesWith(I, V); - if (Instruction *X = foldShuffledBinop(I)) + if (Instruction *X = foldVectorBinop(I)) return X; // Handle the integer div common cases @@ -1105,7 +1105,7 @@ Instruction *InstCombiner::visitFDiv(BinaryOperator &I) { SQ.getWithInstruction(&I))) return replaceInstUsesWith(I, V); - if (Instruction *X = foldShuffledBinop(I)) + if (Instruction *X = foldVectorBinop(I)) return X; if (Instruction *R = foldFDivConstantDivisor(I)) @@ -1234,7 +1234,7 @@ Instruction *InstCombiner::visitURem(BinaryOperator &I) { SQ.getWithInstruction(&I))) return replaceInstUsesWith(I, V); - if (Instruction *X = foldShuffledBinop(I)) + if (Instruction *X = foldVectorBinop(I)) return X; if (Instruction *common = commonIRemTransforms(I)) @@ -1281,7 +1281,7 @@ Instruction *InstCombiner::visitSRem(BinaryOperator &I) { SQ.getWithInstruction(&I))) return replaceInstUsesWith(I, V); - if (Instruction *X = foldShuffledBinop(I)) + if (Instruction *X = foldVectorBinop(I)) return X; // Handle the integer rem common cases @@ -1355,7 +1355,7 @@ Instruction *InstCombiner::visitFRem(BinaryOperator &I) { SQ.getWithInstruction(&I))) return replaceInstUsesWith(I, V); - if (Instruction *X = foldShuffledBinop(I)) + if (Instruction *X = foldVectorBinop(I)) return X; return nullptr; diff --git a/llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp b/llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp index 1ca75f3989d..045ce423ef6 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp +++ b/llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp @@ -593,7 +593,7 @@ Instruction *InstCombiner::visitShl(BinaryOperator &I) { SQ.getWithInstruction(&I))) return replaceInstUsesWith(I, V); - if (Instruction *X = foldShuffledBinop(I)) + if (Instruction *X = foldVectorBinop(I)) return X; if (Instruction *V = commonShiftTransforms(I)) @@ -697,7 +697,7 @@ Instruction *InstCombiner::visitLShr(BinaryOperator &I) { SQ.getWithInstruction(&I))) return replaceInstUsesWith(I, V); - if (Instruction *X = foldShuffledBinop(I)) + if (Instruction *X = foldVectorBinop(I)) return X; if (Instruction *R = commonShiftTransforms(I)) @@ -825,7 +825,7 @@ Instruction *InstCombiner::visitAShr(BinaryOperator &I) { SQ.getWithInstruction(&I))) return replaceInstUsesWith(I, V); - if (Instruction *X = foldShuffledBinop(I)) + if (Instruction *X = foldVectorBinop(I)) return X; if (Instruction *R = commonShiftTransforms(I)) diff --git a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp index 4785dee2553..158d94388c7 100644 --- a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp +++ b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp @@ -1351,7 +1351,7 @@ Value *InstCombiner::Descale(Value *Val, APInt Scale, bool &NoSignedWrap) { } while (true); } -Instruction *InstCombiner::foldShuffledBinop(BinaryOperator &Inst) { +Instruction *InstCombiner::foldVectorBinop(BinaryOperator &Inst) { if (!Inst.getType()->isVectorTy()) return nullptr; unsigned VWidth = cast<VectorType>(Inst.getType())->getNumElements(); |