[ARM] Fold VCMP into VPT
[llvm-core.git] / test / CodeGen / Thumb2 / mve-vpt-block5.mir
blob753e5ce9c38b949d9a061eab6cf6b859944bde49
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
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-arm-none-eabi"
8   define hidden arm_aapcs_vfpcc <4 x float> @test_vminnmq_m_f32_v2(<4 x float> %inactive1, <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> %inactive1, <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> %inactive1, <4 x float> %2, <4 x float> %b, i32 %conv.i) #2
15     ret <4 x float> %3
16   }
18   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   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" }
21   attributes #1 = { nounwind readnone }
22   attributes #2 = { nounwind }
24 ...
25 ---
26 name:            test_vminnmq_m_f32_v2
27 alignment:       4
28 exposesReturnsTwice: false
29 legalized:       false
30 regBankSelected: false
31 selected:        false
32 failedISel:      false
33 tracksRegLiveness: true
34 hasWinCFI:       false
35 registers:       []
36 liveins:
37   - { reg: '$q0', virtual-reg: '' }
38   - { reg: '$q1', virtual-reg: '' }
39   - { reg: '$q2', 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, $r0
67     ; CHECK-LABEL: name: test_vminnmq_m_f32_v2
68     ; CHECK: liveins: $q0, $q1, $q2, $r0
69     ; CHECK: $vpr = VMSR_P0 killed $r0, 14, $noreg
70     ; CHECK: $q3 = MVE_VORR $q0, $q0, 0, $noreg, undef $q3
71     ; CHECK: BUNDLE implicit-def $vpr, implicit-def dead $q3, implicit-def $d6, implicit-def $s12, implicit-def $s13, implicit-def $d7, implicit-def $s14, implicit-def $s15, implicit-def $q1, implicit-def $d2, implicit-def $s4, implicit-def $s5, implicit-def $d3, implicit-def $s6, implicit-def $s7, implicit killed $q1, implicit $q2, implicit killed $q3 {
72     ; CHECK:   MVE_VPST 4, implicit-def $vpr
73     ; CHECK:   renamable $q3 = nnan ninf nsz MVE_VMINNMf32 killed renamable $q1, renamable $q2, 1, internal renamable $vpr, killed renamable $q3
74     ; CHECK:   renamable $q1 = nnan ninf nsz MVE_VMINNMf32 internal killed renamable $q3, internal renamable $q3, 1, internal renamable $vpr, undef renamable $q1
75     ; CHECK: }
76     ; CHECK: $q3 = MVE_VORR $q0, $q0, 0, $noreg, undef $q3
77     ; CHECK: BUNDLE implicit-def dead $vpr, implicit-def dead $q3, implicit-def $d6, implicit-def $s12, implicit-def $s13, implicit-def $d7, implicit-def $s14, implicit-def $s15, implicit-def $q0, implicit-def $d0, implicit-def $s0, implicit-def $s1, implicit-def $d1, implicit-def $s2, implicit-def $s3, implicit killed $q1, implicit killed $q2, implicit killed $q3, implicit killed $q0 {
78     ; CHECK:   MVE_VPST 4, implicit-def $vpr
79     ; CHECK:   renamable $q3 = nnan ninf nsz MVE_VMINNMf32 killed renamable $q1, renamable $q2, 1, internal renamable $vpr, killed renamable $q3
80     ; CHECK:   renamable $q0 = nnan ninf nsz MVE_VMINNMf32 internal killed renamable $q3, killed renamable $q2, 1, internal killed renamable $vpr, killed renamable $q0
81     ; CHECK: }
82     ; CHECK: tBX_RET 14, $noreg, implicit $q0
83     $vpr = VMSR_P0 killed $r0, 14, $noreg
84     $q3 = MVE_VORR $q0, $q0, 0, $noreg, undef $q3
85     renamable $q3 = nnan ninf nsz MVE_VMINNMf32 killed renamable $q1, renamable $q2, 1, renamable $vpr, killed renamable $q3
86     renamable $q1 = nnan ninf nsz MVE_VMINNMf32 killed renamable $q3, renamable $q3, 1, renamable $vpr, undef renamable $q1
87     $q3 = MVE_VORR $q0, $q0, 0, $noreg, undef $q3
88     renamable $q3 = nnan ninf nsz MVE_VMINNMf32 killed renamable $q1, renamable $q2, 1, renamable $vpr, killed renamable $q3
89     renamable $q0 = nnan ninf nsz MVE_VMINNMf32 killed renamable $q3, killed renamable $q2, 1, killed renamable $vpr, killed renamable $q0
90     tBX_RET 14, $noreg, implicit $q0
92 ...