; RUN: llc -mtriple=riscv64 -mattr=+v \ ; RUN: -verify-machineinstrs -debug-only=riscv-vl-optimizer -o - 2>&1 %s | FileCheck %s ; REQUIRES: asserts ; GitHub Issue #123862 provided a case where the riscv-vl-optimizer pass was ; very slow. It was found that that case benefited greatly from aborting due ; to CommonVL == VLOp. Adding the case provided in the issue would show up ; as a long running test instead of a test failure. We would likley have a hard ; time figuring if that case had a regression. So instead, we check this output ; which was responsible for speeding it up. define @same_vl_imm( %passthru, %a, %b) { ; CHECK: Trying to reduce VL for %{{.+}}:vrm2 = PseudoVADD_VV_M2 ; CHECK: Abort due to CommonVL == VLOp, no point in reducing. %v = call @llvm.riscv.vadd.nxv4i32.nxv4i32( poison, %a, %b, i64 4) %w = call @llvm.riscv.vadd.nxv4i32.nxv4i32( poison, %v, %a, i64 4) ret %w } define @same_vl_reg( %passthru, %a, %b, i64 %vl) { ; CHECK: Trying to reduce VL for %{{.+}}:vrm2 = PseudoVADD_VV_M2 ; CHECK: Abort due to CommonVL == VLOp, no point in reducing. %v = call @llvm.riscv.vadd.nxv4i32.nxv4i32( poison, %a, %b, i64 %vl) %w = call @llvm.riscv.vadd.nxv4i32.nxv4i32( poison, %v, %a, i64 %vl) ret %w }