[ARM] Fix for MVE VPT block pass
[llvm-core.git] / test / CodeGen / Thumb2 / mve-vpt-block2.mir
blob7146ecd927f69e0d223bfef687ff2a19470c7f6f
1 # RUN: llc -run-pass arm-mve-vpt %s -o - | FileCheck %s
3 --- |
4   target datalayout = "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64"
5   target triple = "thumbv8.1m.main-arm-none-eabi"
7   define hidden arm_aapcs_vfpcc <4 x float> @test_vminnmq_m_f32_v2(<4 x float> %inactive1, <4 x float> %inactive2, <4 x float> %a, <4 x float> %b, i16 zeroext %p) local_unnamed_addr #0 {
8   entry:
9     %conv.i = zext i16 %p to i32
10     %0 = 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> %a, <4 x float> %b, i32 %conv.i) #2
11     %1 = 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> %0, <4 x float> %b, i32 %conv.i) #2
12     ret <4 x float> %1
13   }
15   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
16   declare void @llvm.stackprotector(i8*, i8**) #2
18   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" "no-frame-pointer-elim"="false" "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" }
19   attributes #1 = { nounwind readnone }
20   attributes #2 = { nounwind }
23 ...
24 ---
25 name:            test_vminnmq_m_f32_v2
26 alignment:       2
27 exposesReturnsTwice: false
28 legalized:       false
29 regBankSelected: false
30 selected:        false
31 failedISel:      false
32 tracksRegLiveness: true
33 hasWinCFI:       false
34 registers:       []
35 liveins:
36   - { reg: '$q0', virtual-reg: '' }
37   - { reg: '$q1', virtual-reg: '' }
38   - { reg: '$q2', virtual-reg: '' }
39   - { reg: '$q3', virtual-reg: '' }
40   - { reg: '$r0', virtual-reg: '' }
41 frameInfo:
42   isFrameAddressTaken: false
43   isReturnAddressTaken: false
44   hasStackMap:     false
45   hasPatchPoint:   false
46   stackSize:       0
47   offsetAdjustment: 0
48   maxAlignment:    0
49   adjustsStack:    false
50   hasCalls:        false
51   stackProtector:  ''
52   maxCallFrameSize: 0
53   cvBytesOfCalleeSavedRegisters: 0
54   hasOpaqueSPAdjustment: false
55   hasVAStart:      false
56   hasMustTailInVarArgFunc: false
57   localFrameSize:  0
58   savePoint:       ''
59   restorePoint:    ''
60 fixedStack:      []
61 stack:           []
62 constants:       []
63 body:             |
64   bb.0.entry:
65     liveins: $q0, $q1, $q2, $q3, $r0
67     ; CHECK:       MVE_VPST 4, implicit-def $p0
68     ; CHECK-NEXT:  renamable $q0 = nnan ninf nsz MVE_VMINNMf32
69     ; CHECK-NEXT:  renamable $q1 = nnan ninf nsz MVE_VMINNMf32
71     $vpr = VMSR_P0 killed $r0, 14, $noreg
72     renamable $q0 = nnan ninf nsz MVE_VMINNMf32 killed renamable $q2, renamable $q3, 1, renamable $vpr, killed renamable $q0
73     renamable $q1 = nnan ninf nsz MVE_VMINNMf32 killed renamable $q0, killed renamable $q3, 1, killed renamable $vpr, killed renamable $q1
74     $q0 = MVE_VORR killed $q1, killed $q1, 0, $noreg, undef $q0
75     tBX_RET 14, $noreg, implicit $q0
77 ...