Skip to content

Commit d26808c

Browse files
authored
[RISCV] Move RISCVInsertVSETVLI::coalesceVSETVLIs back to before insertReadVL (#96056)
1 parent 4d6b992 commit d26808c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1813,11 +1813,6 @@ bool RISCVInsertVSETVLI::runOnMachineFunction(MachineFunction &MF) {
18131813
for (MachineBasicBlock &MBB : MF)
18141814
emitVSETVLIs(MBB);
18151815

1816-
// Insert PseudoReadVL after VLEFF/VLSEGFF and replace it with the vl output
1817-
// of VLEFF/VLSEGFF.
1818-
for (MachineBasicBlock &MBB : MF)
1819-
insertReadVL(MBB);
1820-
18211816
// Now that all vsetvlis are explicit, go through and do block local
18221817
// DSE and peephole based demanded fields based transforms. Note that
18231818
// this *must* be done outside the main dataflow so long as we allow
@@ -1827,6 +1822,11 @@ bool RISCVInsertVSETVLI::runOnMachineFunction(MachineFunction &MF) {
18271822
for (MachineBasicBlock &MBB : MF)
18281823
coalesceVSETVLIs(MBB);
18291824

1825+
// Insert PseudoReadVL after VLEFF/VLSEGFF and replace it with the vl output
1826+
// of VLEFF/VLSEGFF.
1827+
for (MachineBasicBlock &MBB : MF)
1828+
insertReadVL(MBB);
1829+
18301830
BlockInfo.clear();
18311831
return HaveVectorOp;
18321832
}

0 commit comments

Comments
 (0)