Skip to content

Commit

Permalink
[RISCV] Enable ordered reduction.
Browse files Browse the repository at this point in the history
Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D144455
  • Loading branch information
Mel-Chen committed Mar 7, 2023
1 parent 92e0ab9 commit d5c404d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h
Expand Up @@ -75,6 +75,7 @@ class RISCVTTIImpl : public BasicTTIImplBase<RISCVTTIImpl> {

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(bool IVUpdateMayOverflow) const {
Expand Down
@@ -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
Expand Down

0 comments on commit d5c404d

Please sign in to comment.