File tree Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ def HasSignExt :
78
78
79
79
def HasSIMD128 :
80
80
Predicate<"Subtarget->hasSIMD128()">,
81
- AssemblerPredicate<(all_of FeatureSIMD128), "simd128">;
81
+ AssemblerPredicate<(any_of FeatureSIMD128, FeatureRelaxedSIMD ), "simd128">;
82
82
83
83
def HasTailCall :
84
84
Predicate<"Subtarget->hasTailCall()">,
Original file line number Diff line number Diff line change
1
+ ; RUN: llc < %s -verify-machineinstrs -mattr=+relaxed-simd | FileCheck %s
2
+
3
+ ; Test that setting "relaxed-simd" target feature set also implies 'simd128' in
4
+ ; AssemblerPredicate, which is used to verify instructions in AsmPrinter.
5
+
6
+ target triple = "wasm32-unknown-unknown"
7
+
8
+ declare <2 x i64 > @llvm.wasm.relaxed.laneselect.v2i64 (<2 x i64 >, <2 x i64 >, <2 x i64 >)
9
+
10
+ ; The compiled result of this function uses LOCAL_GET_V128, which is predicated
11
+ ; on the 'simd128' feature. We should be able to compile this when only
12
+ ; 'relaxed-simd' is set, which implies 'simd128'.
13
+ define <2 x i64 > @test (<2 x i64 >, <2 x i64 >, <2 x i64 >) #0 {
14
+ ; CHECK-LABEL: test:
15
+ ; CHECK: .functype test (v128, v128, v128) -> (v128)
16
+ ; CHECK-NEXT: # %bb.0:
17
+ ; CHECK-NEXT: local.get 0
18
+ ; CHECK-NEXT: local.get 1
19
+ ; CHECK-NEXT: local.get 2
20
+ ; CHECK-NEXT: i64x2.relaxed_laneselect
21
+ start:
22
+ %_4 = tail call <2 x i64 > @llvm.wasm.relaxed.laneselect.v2i64 (<2 x i64 > %0 , <2 x i64 > %1 , <2 x i64 > %2 ) #3
23
+ ret <2 x i64 > %_4
24
+ }
You can’t perform that action at this time.
0 commit comments