blob: 6af6204848bc8fa1ad8e90dbb4e25287588dfd4b [file] [log] [blame]
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
# RUN: llc %s -mtriple=riscv64 -run-pass=riscv-cleanup-vsetvli -o - | FileCheck %s
# Make sure we don't combine these two VSETVLIs in the cleanup pass. The first
# keeps the previous value of VL, the second time sets it to VLMAX. We can't
# remove the first since we can't tell if this is a change VL.
--- |
; ModuleID = '../llvm/test/CodeGen/RISCV/rvv/add-vsetvli-vlmax.ll'
source_filename = "../llvm/test/CodeGen/RISCV/rvv/add-vsetvli-vlmax.ll"
target datalayout = "e-m:e-p:64:64-i64:64-i128:128-n64-S128"
target triple = "riscv64"
define void @cleanup_vsetvli() #0 {
ret void
}
attributes #0 = { "target-features"="+experimental-v" }
...
---
name: cleanup_vsetvli
alignment: 4
tracksRegLiveness: true
registers:
- { id: 0, class: gpr }
frameInfo:
maxAlignment: 1
machineFunctionInfo: {}
body: |
bb.0 (%ir-block.0):
; CHECK-LABEL: name: cleanup_vsetvli
; CHECK: dead $x0 = PseudoVSETVLI $x0, 12, implicit-def $vl, implicit-def $vtype
; CHECK: dead %0:gpr = PseudoVSETVLI $x0, 12, implicit-def $vl, implicit-def $vtype
; CHECK: PseudoRET
dead $x0 = PseudoVSETVLI $x0, 12, implicit-def $vl, implicit-def $vtype
dead %0:gpr = PseudoVSETVLI $x0, 12, implicit-def $vl, implicit-def $vtype
PseudoRET
...