Skip to content

Commit b5c5953

Browse files
committed
Update comment
1 parent 92b71ed commit b5c5953

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

llvm/lib/Target/RISCV/RISCVISelLowering.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10331,10 +10331,11 @@ SDValue RISCVTargetLowering::lowerVECTOR_REVERSE(SDValue Op,
1033110331
MVT XLenVT = Subtarget.getXLenVT();
1033210332
auto [Mask, VL] = getDefaultVLOps(VecVT, ContainerVT, DL, DAG, Subtarget);
1033310333

10334-
// On most uarchs vrgather.vv is quadratic in LMUL because each output
10335-
// register may read from LMUL registers. However to reverse a vector each
10336-
// output register only needs to read from one register. So decompose it into
10337-
// LMUL * M1 vrgather.vvs, so we get O(LMUL) performance instead of O(LMUL^2).
10334+
// On some uarchs vrgather.vv will read from every input register for each
10335+
// output register, regardless of the indices. However to reverse a vector
10336+
// each output register only needs to read from one register. So decompose it
10337+
// into LMUL * M1 vrgather.vvs, so we get O(LMUL) performance instead of
10338+
// O(LMUL^2).
1033810339
//
1033910340
// vsetvli a1, zero, e64, m4, ta, ma
1034010341
// vrgatherei16.vv v12, v8, v16

0 commit comments

Comments
 (0)