diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp index 555c8435dd330..1c82fd174dbec 100644 --- a/llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp +++ b/llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp @@ -666,7 +666,6 @@ bool LoopVectorizationLegality::canVectorizeOuterLoop() { // Check whether we are able to set up outer loop induction. if (!setupOuterLoopInductions()) { reportVectorizationFailure("Unsupported outer loop Phi(s)", - "Unsupported outer loop Phi(s)", "UnsupportedPhi", ORE, TheLoop); if (DoExtraAnalysis) Result = false; @@ -962,7 +961,6 @@ bool LoopVectorizationLegality::canVectorizeInstrs() { Type *T = ST->getValueOperand()->getType(); if (!VectorType::isValidElementType(T)) { reportVectorizationFailure("Store instruction cannot be vectorized", - "store instruction cannot be vectorized", "CantVectorizeStore", ORE, TheLoop, ST); return false; } @@ -975,7 +973,6 @@ bool LoopVectorizationLegality::canVectorizeInstrs() { assert(VecTy && "did not find vectorized version of stored type"); if (!TTI->isLegalNTStore(VecTy, ST->getAlign())) { reportVectorizationFailure( - "nontemporal store instruction cannot be vectorized", "nontemporal store instruction cannot be vectorized", "CantVectorizeNontemporalStore", ORE, TheLoop, ST); return false; @@ -990,7 +987,6 @@ bool LoopVectorizationLegality::canVectorizeInstrs() { assert(VecTy && "did not find vectorized version of load type"); if (!TTI->isLegalNTLoad(VecTy, LD->getAlign())) { reportVectorizationFailure( - "nontemporal load instruction cannot be vectorized", "nontemporal load instruction cannot be vectorized", "CantVectorizeNontemporalLoad", ORE, TheLoop, LD); return false; @@ -1020,7 +1016,6 @@ bool LoopVectorizationLegality::canVectorizeInstrs() { continue; } reportVectorizationFailure("Value cannot be used outside the loop", - "value cannot be used outside the loop", "ValueUsedOutsideLoop", ORE, TheLoop, &I); return false; } @@ -1442,9 +1437,7 @@ bool LoopVectorizationLegality::blockCanBePredicated( bool LoopVectorizationLegality::canVectorizeWithIfConvert() { if (!EnableIfConversion) { reportVectorizationFailure("If-conversion is disabled", - "if-conversion is disabled", - "IfConversionDisabled", - ORE, TheLoop); + "IfConversionDisabled", ORE, TheLoop); return false; } @@ -1493,14 +1486,12 @@ bool LoopVectorizationLegality::canVectorizeWithIfConvert() { if (isa(BB->getTerminator())) { if (TheLoop->isLoopExiting(BB)) { reportVectorizationFailure("Loop contains an unsupported switch", - "loop contains an unsupported switch", "LoopContainsUnsupportedSwitch", ORE, TheLoop, BB->getTerminator()); return false; } } else if (!isa(BB->getTerminator())) { reportVectorizationFailure("Loop contains an unsupported terminator", - "loop contains an unsupported terminator", "LoopContainsUnsupportedTerminator", ORE, TheLoop, BB->getTerminator()); return false; @@ -1510,8 +1501,7 @@ bool LoopVectorizationLegality::canVectorizeWithIfConvert() { if (blockNeedsPredication(BB) && !blockCanBePredicated(BB, SafePointers, MaskedOp)) { reportVectorizationFailure( - "Control flow cannot be substituted for a select", - "control flow cannot be substituted for a select", "NoCFGForSelect", + "Control flow cannot be substituted for a select", "NoCFGForSelect", ORE, TheLoop, BB->getTerminator()); return false; } @@ -1700,8 +1690,6 @@ bool LoopVectorizationLegality::isVectorizableEarlyExitLoop() { return false; } else if (!IsSafeOperation(&I)) { reportVectorizationFailure("Early exit loop contains operations that " - "cannot be speculatively executed", - "Early exit loop contains operations that " "cannot be speculatively executed", "UnsafeOperationsEarlyExitLoop", ORE, TheLoop); @@ -1764,9 +1752,7 @@ bool LoopVectorizationLegality::canVectorize(bool UseVPlanNativePath) { if (!canVectorizeOuterLoop()) { reportVectorizationFailure("Unsupported outer loop", - "unsupported outer loop", - "UnsupportedOuterLoop", - ORE, TheLoop); + "UnsupportedOuterLoop", ORE, TheLoop); // TODO: Implement DoExtraAnalysis when subsequent legal checks support // outer loops. return false; diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp index a8511483e00fb..1f6996cd9c1f4 100644 --- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp +++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp @@ -4274,7 +4274,6 @@ LoopVectorizationCostModel::computeMaxVF(ElementCount UserVF, unsigned UserIC) { if (TC == 0) { reportVectorizationFailure( - "Unable to calculate the loop count due to complex control flow", "unable to calculate the loop count due to complex control flow", "UnknownLoopCountComplexCFG", ORE, TheLoop); return FixedScalableVFPair::getNone(); @@ -9360,7 +9359,6 @@ LoopVectorizationPlanner::tryToBuildVPlanWithVPRecipes(VFRange &Range) { addExitUsersForFirstOrderRecurrences(*Plan, ExitUsersToFix); if (!addUsersInExitBlocks(*Plan, ExitUsersToFix)) { reportVectorizationFailure( - "Some exit values in loop with uncountable exit not supported yet", "Some exit values in loop with uncountable exit not supported yet", "UncountableEarlyExitLoopsUnsupportedExitValue", ORE, OrigLoop); return nullptr; diff --git a/llvm/test/Transforms/LoopVectorize/X86/vectorization-remarks-missed.ll b/llvm/test/Transforms/LoopVectorize/X86/vectorization-remarks-missed.ll index 99911b251c81e..4c0317e300f19 100644 --- a/llvm/test/Transforms/LoopVectorize/X86/vectorization-remarks-missed.ll +++ b/llvm/test/Transforms/LoopVectorize/X86/vectorization-remarks-missed.ll @@ -41,7 +41,7 @@ ; } ; return k; ; } -; CHECK: remark: source.cpp:29:7: loop not vectorized: control flow cannot be substituted for a select +; CHECK: remark: source.cpp:29:7: loop not vectorized: Control flow cannot be substituted for a select ; CHECK: remark: source.cpp:27:3: loop not vectorized ; YAML: --- !Analysis @@ -104,7 +104,7 @@ ; YAML-NEXT: Function: test_multiple_failures ; YAML-NEXT: Args: ; YAML-NEXT: - String: 'loop not vectorized: ' -; YAML-NEXT: - String: control flow cannot be substituted for a select +; YAML-NEXT: - String: Control flow cannot be substituted for a select ; YAML-NEXT: ... ; YAML-NEXT: --- !Analysis ; YAML-NEXT: Pass: loop-vectorize