1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2# RUN: llc -run-pass arm-mve-vpt %s -o - | FileCheck %s
3
4--- |
5  target datalayout = "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64"
6  target triple = "thumbv8.1m.main-none-none-eabi"
7
8  define hidden arm_aapcs_vfpcc <4 x float> @vpt_2_blocks(<4 x float> %inactive1, <4 x float> %inactive2, <4 x float> %a, <4 x float> %b, i16 zeroext %p) local_unnamed_addr #0 {
9  entry:
10    %conv.i = zext i16 %p to i32
11    %0 = tail call nnan ninf nsz <4 x float> @llvm.arm.mve.vminnm.m.v4f32.v4f32.v4f32.v4f32.i32(<4 x float> undef, <4 x float> %a, <4 x float> %b, i32 %conv.i) #2
12    %1 = tail call nnan ninf nsz <4 x float> @llvm.arm.mve.vminnm.m.v4f32.v4f32.v4f32.v4f32.i32(<4 x float> undef, <4 x float> %0, <4 x float> %0, i32 %conv.i) #2
13    %2 = tail call nnan ninf nsz <4 x float> @llvm.arm.mve.vminnm.m.v4f32.v4f32.v4f32.v4f32.i32(<4 x float> %inactive1, <4 x float> %1, <4 x float> %b, i32 %conv.i) #2
14    %3 = tail call nnan ninf nsz <4 x float> @llvm.arm.mve.vminnm.m.v4f32.v4f32.v4f32.v4f32.i32(<4 x float> undef, <4 x float> %2, <4 x float> %b, i32 %conv.i) #2
15    %4 = tail call nnan ninf nsz <4 x float> @llvm.arm.mve.vminnm.m.v4f32.v4f32.v4f32.v4f32.i32(<4 x float> %inactive2, <4 x float> %3, <4 x float> %b, i32 %conv.i) #2
16    ret <4 x float> %4
17  }
18
19  declare <4 x float> @llvm.arm.mve.vminnm.m.v4f32.v4f32.v4f32.v4f32.i32(<4 x float>, <4 x float>, <4 x float>, i32) #1
20
21  attributes #0 = { nounwind readnone "correctly-rounded-divide-sqrt-fp-math"="false" "denormal-fp-math"="preserve-sign" "disable-tail-calls"="false" "less-precise-fpmad"="false" "min-legal-vector-width"="128" "frame-pointer"="none" "no-infs-fp-math"="true" "no-jump-tables"="false" "no-nans-fp-math"="true" "no-signed-zeros-fp-math"="true" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="generic" "target-features"="+armv8.1-m.main,+hwdiv,+mve.fp,+ras,+thumb-mode" "unsafe-fp-math"="false" "use-soft-float"="false" }
22  attributes #1 = { nounwind readnone }
23  attributes #2 = { nounwind }
24
25...
26---
27name:            vpt_2_blocks
28alignment:       4
29exposesReturnsTwice: false
30legalized:       false
31regBankSelected: false
32selected:        false
33failedISel:      false
34tracksRegLiveness: true
35hasWinCFI:       false
36registers:       []
37liveins:
38  - { reg: '$q0', virtual-reg: '' }
39  - { reg: '$q1', virtual-reg: '' }
40  - { reg: '$q2', virtual-reg: '' }
41  - { reg: '$q3', virtual-reg: '' }
42  - { reg: '$r0', virtual-reg: '' }
43frameInfo:
44  isFrameAddressTaken: false
45  isReturnAddressTaken: false
46  hasStackMap:     false
47  hasPatchPoint:   false
48  stackSize:       0
49  offsetAdjustment: 0
50  maxAlignment:    0
51  adjustsStack:    false
52  hasCalls:        false
53  stackProtector:  ''
54  maxCallFrameSize: 0
55  cvBytesOfCalleeSavedRegisters: 0
56  hasOpaqueSPAdjustment: false
57  hasVAStart:      false
58  hasMustTailInVarArgFunc: false
59  localFrameSize:  0
60  savePoint:       ''
61  restorePoint:    ''
62fixedStack:      []
63stack:           []
64constants:       []
65body:             |
66  bb.0.entry:
67    liveins: $q0, $q1, $q2, $q3, $r0
68
69    ; CHECK-LABEL: name: vpt_2_blocks
70    ; CHECK: liveins: $q0, $q1, $q2, $q3, $r0
71    ; CHECK: $vpr = VMSR_P0 killed $r0, 14 /* CC::al */, $noreg
72    ; CHECK: BUNDLE implicit-def dead $q2, implicit-def $d4, implicit-def $s8, implicit-def $s9, implicit-def $d5, implicit-def $s10, implicit-def $s11, implicit-def $q0, implicit-def $d0, implicit-def $s0, implicit-def $s1, implicit-def $d1, implicit-def $s2, implicit-def $s3, implicit $vpr, implicit killed $q2, implicit $q3, implicit killed $q0 {
73    ; CHECK:   MVE_VPST 1, implicit $vpr
74    ; CHECK:   renamable $q2 = nnan ninf nsz MVE_VMINNMf32 killed renamable $q2, renamable $q3, 1, renamable $vpr, undef renamable $q2
75    ; CHECK:   renamable $q2 = nnan ninf nsz MVE_VMINNMf32 internal killed renamable $q2, internal renamable $q2, 1, renamable $vpr, internal undef renamable $q2
76    ; CHECK:   renamable $q0 = nnan ninf nsz MVE_VMINNMf32 internal killed renamable $q2, renamable $q3, 1, renamable $vpr, killed renamable $q0
77    ; CHECK:   renamable $q0 = nnan ninf nsz MVE_VMINNMf32 internal killed renamable $q0, renamable $q3, 1, renamable $vpr, internal undef renamable $q0
78    ; CHECK: }
79    ; CHECK: BUNDLE implicit-def $q1, implicit-def $d2, implicit-def $s4, implicit-def $s5, implicit-def $d3, implicit-def $s6, implicit-def $s7, implicit killed $vpr, implicit killed $q0, implicit killed $q3, implicit killed $q1 {
80    ; CHECK:   MVE_VPST 8, implicit $vpr
81    ; CHECK:   renamable $q1 = nnan ninf nsz MVE_VMINNMf32 killed renamable $q0, killed renamable $q3, 1, killed renamable $vpr, killed renamable $q1
82    ; CHECK: }
83    ; CHECK: $q0 = MVE_VORR killed $q1, killed $q1, 0, $noreg, undef $q0
84    ; CHECK: tBX_RET 14 /* CC::al */, $noreg, implicit $q0
85    $vpr = VMSR_P0 killed $r0, 14, $noreg
86    renamable $q2 = nnan ninf nsz MVE_VMINNMf32 killed renamable $q2, renamable $q3, 1, renamable $vpr, undef renamable $q2
87    renamable $q2 = nnan ninf nsz MVE_VMINNMf32 killed renamable $q2, renamable $q2, 1, renamable $vpr, undef renamable $q2
88    renamable $q0 = nnan ninf nsz MVE_VMINNMf32 killed renamable $q2, renamable $q3, 1, renamable $vpr, killed renamable $q0
89    renamable $q0 = nnan ninf nsz MVE_VMINNMf32 killed renamable $q0, renamable $q3, 1, renamable $vpr, undef renamable $q0
90    renamable $q1 = nnan ninf nsz MVE_VMINNMf32 killed renamable $q0, killed renamable $q3, 1, killed renamable $vpr, killed renamable $q1
91    $q0 = MVE_VORR killed $q1, killed $q1, 0, $noreg, undef $q0
92    tBX_RET 14, $noreg, implicit $q0
93
94...
95