|
1 |
| -; RUN: llc < %s | FileCheck %s --check-prefixes CHECK,ATTRS |
2 |
| -; RUN: llc < %s -mcpu=mvp -mattr=+simd128 | FileCheck %s --check-prefixes CHECK,SIMD128 |
3 |
| -; RUN: llc < %s -mcpu=bleeding-edge | FileCheck %s --check-prefixes CHECK,BLEEDING-EDGE |
| 1 | +; RUN: llc -mcpu=mvp < %s | FileCheck %s |
| 2 | +; RUN: llc -mcpu=mvp -mattr=+simd128 < %s | FileCheck %s --check-prefixes SIMD128 |
4 | 3 |
|
5 | 4 | ; Test that codegen emits target features from the command line or
|
6 | 5 | ; function attributes correctly and that features are enabled for the
|
@@ -33,84 +32,53 @@ attributes #2 = { "target-features"="+reference-types" }
|
33 | 32 | ; CHECK-LABEL: fn_atomics:
|
34 | 33 |
|
35 | 34 | ; Expanded atomicrmw min
|
36 |
| -; ATTRS: loop |
| 35 | +; CHECK: loop |
37 | 36 | ; CHECK: i32.atomic.rmw.cmpxchg
|
38 |
| -; ATTRS: end_loop |
| 37 | +; CHECK: end_loop |
39 | 38 |
|
40 | 39 | ; nontrapping fptoint
|
41 | 40 | ; CHECK: i32.trunc_sat_f32_u
|
42 |
| -; ATTRS: i32.store |
| 41 | +; CHECK: i32.store |
43 | 42 |
|
44 | 43 | ; `fn_nontrapping_fptoint` should be the same as `fn_atomics`
|
45 | 44 | ; CHECK-LABEL: fn_nontrapping_fptoint:
|
46 | 45 |
|
47 | 46 | ; Expanded atomicrmw min
|
48 |
| -; ATTRS: loop |
| 47 | +; CHECK: loop |
49 | 48 | ; CHECK: i32.atomic.rmw.cmpxchg
|
50 |
| -; ATTRS: end_loop |
| 49 | +; CHECK: end_loop |
51 | 50 |
|
52 | 51 | ; nontrapping fptoint
|
53 | 52 | ; CHECK: i32.trunc_sat_f32_u
|
54 |
| -; ATTRS: i32.store |
| 53 | +; CHECK: i32.store |
55 | 54 |
|
| 55 | +; Features in function attributes: |
| 56 | +; +atomics, +nontrapping-fptoint, +reference-types |
56 | 57 | ; CHECK-LABEL: .custom_section.target_features,"",@
|
57 |
| - |
58 |
| -; +atomics, +reference-types, +mutable-globals |
59 |
| -; ATTRS-NEXT: .int8 5 |
60 |
| -; ATTRS-NEXT: .int8 43 |
61 |
| -; ATTRS-NEXT: .int8 7 |
62 |
| -; ATTRS-NEXT: .ascii "atomics" |
63 |
| -; ATTRS-NEXT: .int8 43 |
64 |
| -; ATTRS-NEXT: .int8 15 |
65 |
| -; ATTRS-NEXT: .ascii "mutable-globals" |
66 |
| -; ATTRS-NEXT: .int8 43 |
67 |
| -; ATTRS-NEXT: .int8 19 |
68 |
| -; ATTRS-NEXT: .ascii "nontrapping-fptoint" |
69 |
| -; ATTRS-NEXT: .int8 43 |
70 |
| -; ATTRS-NEXT: .int8 15 |
71 |
| -; ATTRS-NEXT: .ascii "reference-types" |
72 |
| -; ATTRS-NEXT: .int8 43 |
73 |
| -; ATTRS-NEXT: .int8 8 |
74 |
| - |
| 58 | +; CHECK-NEXT: .int8 3 |
| 59 | +; CHECK-NEXT: .int8 43 |
| 60 | +; CHECK-NEXT: .int8 7 |
| 61 | +; CHECK-NEXT: .ascii "atomics" |
| 62 | +; CHECK-NEXT: .int8 43 |
| 63 | +; CHECK-NEXT: .int8 19 |
| 64 | +; CHECK-NEXT: .ascii "nontrapping-fptoint" |
| 65 | +; CHECK-NEXT: .int8 43 |
| 66 | +; CHECK-NEXT: .int8 15 |
| 67 | +; CHECK-NEXT: .ascii "reference-types" |
| 68 | + |
| 69 | +; Features in function attributes + features specified by -mattr= option: |
75 | 70 | ; +atomics, +nontrapping-fptoint, +reference-types, +simd128
|
76 |
| -; SIMD128-NEXT: .int8 4 |
77 |
| -; SIMD128-NEXT: .int8 43 |
78 |
| -; SIMD128-NEXT: .int8 7 |
79 |
| -; SIMD128-NEXT: .ascii "atomics" |
80 |
| -; SIMD128-NEXT: .int8 43 |
81 |
| -; SIMD128-NEXT: .int8 19 |
82 |
| -; SIMD128-NEXT: .ascii "nontrapping-fptoint" |
83 |
| -; SIMD128-NEXT: .int8 43 |
84 |
| -; SIMD128-NEXT: .int8 15 |
85 |
| -; SIMD128-NEXT: .ascii "reference-types" |
86 |
| -; SIMD128-NEXT: .int8 43 |
87 |
| -; SIMD128-NEXT: .int8 7 |
88 |
| -; SIMD128-NEXT: .ascii "simd128" |
89 |
| - |
90 |
| -; +atomics, +bulk-memory, +mutable-globals, +nontrapping-fptoint, |
91 |
| -; +reference-types, +sign-ext, +simd128, +tail-call |
92 |
| -; BLEEDING-EDGE-NEXT: .int8 8 |
93 |
| -; BLEEDING-EDGE-NEXT: .int8 43 |
94 |
| -; BLEEDING-EDGE-NEXT: .int8 7 |
95 |
| -; BLEEDING-EDGE-NEXT: .ascii "atomics" |
96 |
| -; BLEEDING-EDGE-NEXT: .int8 43 |
97 |
| -; BLEEDING-EDGE-NEXT: .int8 11 |
98 |
| -; BLEEDING-EDGE-NEXT: .ascii "bulk-memory" |
99 |
| -; BLEEDING-EDGE-NEXT: .int8 43 |
100 |
| -; BLEEDING-EDGE-NEXT: .int8 15 |
101 |
| -; BLEEDING-EDGE-NEXT: .ascii "mutable-globals" |
102 |
| -; BLEEDING-EDGE-NEXT: .int8 43 |
103 |
| -; BLEEDING-EDGE-NEXT: .int8 19 |
104 |
| -; BLEEDING-EDGE-NEXT: .ascii "nontrapping-fptoint" |
105 |
| -; BLEEDING-EDGE-NEXT: .int8 43 |
106 |
| -; BLEEDING-EDGE-NEXT: .int8 15 |
107 |
| -; BLEEDING-EDGE-NEXT: .ascii "reference-types" |
108 |
| -; BLEEDING-EDGE-NEXT: .int8 43 |
109 |
| -; BLEEDING-EDGE-NEXT: .int8 8 |
110 |
| -; BLEEDING-EDGE-NEXT: .ascii "sign-ext" |
111 |
| -; BLEEDING-EDGE-NEXT: .int8 43 |
112 |
| -; BLEEDING-EDGE-NEXT: .int8 7 |
113 |
| -; BLEEDING-EDGE-NEXT: .ascii "simd128" |
114 |
| -; BLEEDING-EDGE-NEXT: .int8 43 |
115 |
| -; BLEEDING-EDGE-NEXT: .int8 9 |
116 |
| -; BLEEDING-EDGE-NEXT: .ascii "tail-call" |
| 71 | +; SIMD128-LABEL: .custom_section.target_features,"",@ |
| 72 | +; SIMD128-NEXT: .int8 4 |
| 73 | +; SIMD128-NEXT: .int8 43 |
| 74 | +; SIMD128-NEXT: .int8 7 |
| 75 | +; SIMD128-NEXT: .ascii "atomics" |
| 76 | +; SIMD128-NEXT: .int8 43 |
| 77 | +; SIMD128-NEXT: .int8 19 |
| 78 | +; SIMD128-NEXT: .ascii "nontrapping-fptoint" |
| 79 | +; SIMD128-NEXT: .int8 43 |
| 80 | +; SIMD128-NEXT: .int8 15 |
| 81 | +; SIMD128-NEXT: .ascii "reference-types" |
| 82 | +; SIMD128-NEXT: .int8 43 |
| 83 | +; SIMD128-NEXT: .int8 7 |
| 84 | +; SIMD128-NEXT: .ascii "simd128" |
0 commit comments