Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions llvm/lib/Target/RISCV/RISCVFeatures.td
Original file line number Diff line number Diff line change
Expand Up @@ -1381,6 +1381,25 @@ def FeaturePredictableSelectIsExpensive
: SubtargetFeature<"predictable-select-expensive", "PredictableSelectIsExpensive", "true",
"Prefer likely predicted branches over selects">;

// This is not a feature that is documented in the RVV spec, but a result of
// messy change history of the whole register move.
//
// The whole register move should be designed as ignoring the vtype, but it was
// somehow constrained to specific microarchitecture and got a dependency of
// vtype. Because people didn't notice the impact of this mistake and the spec
// is very vague and self-contradictory in several places, many cores that are
// already on the market didn't implement the whole register move in the trapped
// way.
//
// This feature is used to indicate that the implementation won't trap on vill
// so that no extra vset(i)vl(i) is needed before the whole register move
// instructions.
//
// See #114518 for more details.
def FeatureNoTrappedWholeRegisterMove
: SubtargetFeature<"no-trapped-whole-register-move", "HasTrappedWholeRegisterMove", "false",
"The whole register move won't trap on vill">;

def TuneOptimizedZeroStrideLoad
: SubtargetFeature<"optimized-zero-stride-load", "HasOptimizedZeroStrideLoad",
"true", "Optimized (perform fewer memory operations)"
Expand Down
3 changes: 2 additions & 1 deletion llvm/lib/Target/RISCV/RISCVProcessors.td
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,8 @@ def SPACEMIT_X60 : RISCVProcessorModel<"spacemit-x60",
FeatureStdExtZicond,
FeatureStdExtZvfh,
FeatureStdExtZvkt,
FeatureStdExtZvl256b]),
FeatureStdExtZvl256b,
FeatureNoTrappedWholeRegisterMove]),
[TuneDLenFactor2,
TuneOptimizedNF2SegmentLoadStore,
TuneOptimizedNF3SegmentLoadStore,
Expand Down
Loading