Skip to content

Commit 1b55b2b

Browse files
committedSep 4, 2018
[WebAssembly][NFC] Fix formatting and tests
Summary: Small fixes Reviewers: aheejin, dschuff Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D51656 llvm-svn: 341411
1 parent 0f70f86 commit 1b55b2b

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed
 

‎llvm/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ multiclass ExtractPat<ValueType lane_t, int mask> {
7171
defm extract_i8x16 : ExtractPat<i8, 0xff>;
7272
defm extract_i16x8 : ExtractPat<i16, 0xffff>;
7373
multiclass ExtractLaneExtended<string sign, bits<32> baseInst> {
74-
defm "" : ExtractLane<v16i8, "i8x16", LaneIdx16, I32, baseInst, sign,
74+
defm "" : ExtractLane<v16i8, "i8x16", LaneIdx16, I32, baseInst, sign,
7575
!cast<PatFrag>("extract_i8x16"#sign)>;
7676
defm "" : ExtractLane<v8i16, "i16x8", LaneIdx8, I32, !add(baseInst, 2), sign,
7777
!cast<PatFrag>("extract_i16x8"#sign)>;

‎llvm/test/CodeGen/WebAssembly/simd.ll

+8-6
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ define <16 x i8> @splat_v16i8(i8 %x) {
3737
ret <16 x i8> %res
3838
}
3939

40-
; CHECK-LABEL: const_splat_v16i8
40+
; CHECK-LABEL: const_splat_v16i8:
4141
; SIMD128; i8x16.splat
4242
define <16 x i8> @const_splat_v16i8() {
4343
ret <16 x i8> <i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42,
@@ -267,7 +267,7 @@ define <4 x i32> @splat_v4i32(i32 %x) {
267267
ret <4 x i32> %res
268268
}
269269

270-
; CHECK-LABEL: const_splat_v4i32
270+
; CHECK-LABEL: const_splat_v4i32:
271271
; SIMD128; i32x4.splat
272272
define <4 x i32> @const_splat_v4i32() {
273273
ret <4 x i32> <i32 42, i32 42, i32 42, i32 42>
@@ -340,6 +340,12 @@ define <2 x i64> @splat_v2i64(i64 %x) {
340340
ret <2 x i64> %res
341341
}
342342

343+
; CHECK-LABEL: const_splat_v2i64:
344+
; SIMD128; i64x2.splat
345+
define <2 x i64> @const_splat_v2i64() {
346+
ret <2 x i64> <i64 42, i64 42>
347+
}
348+
343349
; CHECK-LABEL: extract_v2i64:
344350
; NO-SIMD128-NOT: i64x2
345351
; SIMD128-VM-NOT: i64x2
@@ -364,10 +370,6 @@ define <2 x i64> @replace_v2i64(<2 x i64> %v, i64 %x) {
364370
ret <2 x i64> %res
365371
}
366372

367-
define <2 x i64> @const_splat_v2i64() {
368-
ret <2 x i64> <i64 42, i64 42>
369-
}
370-
371373
; CHECK-LABEL: build_v2i64:
372374
; NO-SIMD128-NOT: i64x2
373375
; SIMD128-VM-NOT: i64x2

0 commit comments

Comments
 (0)
Please sign in to comment.