From d95513ae3a73388cbe18fa1bd2c76fec70f3ec06 Mon Sep 17 00:00:00 2001 From: "Liqin.Weng" Date: Mon, 16 May 2022 12:53:32 +0000 Subject: [PATCH] [RISCV] remove useless code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When legality check for vectoring reduction, hasVInstructions() check be unneeded. RISCV can only loop vectorization with hasVInstructions() Reviewed By: kito-cheng, craig.topper Differential Revision: https://reviews.llvm.org/D125460 --- llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h b/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h index a0a511096352..cdec074dc2a4 100644 --- a/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h +++ b/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h @@ -171,9 +171,6 @@ public: bool isLegalToVectorizeReduction(const RecurrenceDescriptor &RdxDesc, ElementCount VF) const { - if (!ST->hasVInstructions()) - return false; - if (!VF.isScalable()) return true;