[PATCH] D144455: [RISCV] Enable ordered reduction.
Mel Chen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 24 06:55:49 PST 2023
Mel-Chen updated this revision to Diff 500188.
Mel-Chen added a comment.
Update since parent revision.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144455/new/
https://reviews.llvm.org/D144455
Files:
llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h
llvm/test/Transforms/LoopVectorize/RISCV/ordered-reduction.ll
Index: llvm/test/Transforms/LoopVectorize/RISCV/ordered-reduction.ll
===================================================================
--- llvm/test/Transforms/LoopVectorize/RISCV/ordered-reduction.ll
+++ llvm/test/Transforms/LoopVectorize/RISCV/ordered-reduction.ll
@@ -1,5 +1,5 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -passes=loop-vectorize -hints-allow-reordering=false -S < %s | FileCheck %s --check-prefix=CHECK-NOT-VECTORIZED
+; RUN: opt -passes=loop-vectorize -hints-allow-reordering=false -S < %s | FileCheck %s --check-prefix=CHECK-ORDERED
; RUN: opt -passes=loop-vectorize -S < %s | FileCheck %s --check-prefix=CHECK-UNORDERED
; RUN: opt -passes=loop-vectorize -force-ordered-reductions=false -hints-allow-reordering=false -S < %s | FileCheck %s --check-prefix=CHECK-NOT-VECTORIZED
; RUN: opt -passes=loop-vectorize -force-ordered-reductions=true -hints-allow-reordering=false -S < %s | FileCheck %s --check-prefix=CHECK-ORDERED
Index: llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h
===================================================================
--- llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h
+++ llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h
@@ -75,6 +75,7 @@
bool shouldExpandReduction(const IntrinsicInst *II) const;
bool supportsScalableVectors() const { return ST->hasVInstructions(); }
+ bool enableOrderedReductions() const { return true; }
bool enableScalableVectorization() const { return ST->hasVInstructions(); }
TailFoldingStyle getPreferredTailFoldingStyle() const {
return ST->hasVInstructions() ? TailFoldingStyle::Data
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D144455.500188.patch
Type: text/x-patch
Size: 1636 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230224/7839304d/attachment.bin>
More information about the llvm-commits
mailing list