[llvm] [RISCV] Add Tune to DontSinkSplatOperands (PR #79199)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 25 09:41:49 PST 2024


================
@@ -0,0 +1,654 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: llc < %s -mtriple=riscv64 -mattr=+m,+v,+f -target-abi=lp64f \
+; RUN:   -mattr=+no-sink-splat-operands -riscv-v-vector-bits-min=128 \
+; RUN:   | FileCheck -check-prefix=DONT-SINK %s
+; RUN: llc < %s -mtriple=riscv64 -mattr=+m,+v,+f -target-abi=lp64f \
+; RUN:   -mattr=-no-sink-splat-operands -riscv-v-vector-bits-min=128 \
+; RUN:   | FileCheck -check-prefix=SINK %s
+; RUN: llc < %s -mtriple=riscv64 -mattr=+m,+v,+f -target-abi=lp64f \
+; RUN:   -riscv-v-vector-bits-min=128 \
+; RUN:   | FileCheck -check-prefix=DEFAULT %s
+
+; Test that we don't sink splat operands when compiling with no-sink-splat-operands.
+; Each scalar register access requires a S2V transfer buffer entry. Using too many
+; limits performance.
+; FIXME: This is potentially bad for register pressure. Need a better heuristic.
+
+define void @sink_splat_add(i32* nocapture %a, i32 signext %x) {
+; DONT-SINK-LABEL: sink_splat_add:
----------------
topperc wrote:

DONT -> NO

https://github.com/llvm/llvm-project/pull/79199


More information about the llvm-commits mailing list