Please use GitHub pull requests for new patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
llvm/test/CodeGen/WebAssembly/simd.ll
Show First 20 Lines • Show All 477 Lines • ▼ Show 20 Lines | %res = shufflevector <8 x i16> %x, <8 x i16> %y, | ||||
<8 x i32> <i32 0, i32 9, i32 2, i32 11, i32 4, i32 13, i32 6, i32 15> | <8 x i32> <i32 0, i32 9, i32 2, i32 11, i32 4, i32 13, i32 6, i32 15> | ||||
ret <8 x i16> %res | ret <8 x i16> %res | ||||
} | } | ||||
; CHECK-LABEL: shuffle_undef_v8i16: | ; CHECK-LABEL: shuffle_undef_v8i16: | ||||
; NO-SIMD128-NOT: i8x16 | ; NO-SIMD128-NOT: i8x16 | ||||
; SIMD128-NEXT: .functype shuffle_undef_v8i16 (v128, v128) -> (v128){{$}} | ; SIMD128-NEXT: .functype shuffle_undef_v8i16 (v128, v128) -> (v128){{$}} | ||||
; SIMD128-NEXT: i8x16.shuffle $push[[R:[0-9]+]]=, $0, $0, | ; SIMD128-NEXT: i8x16.shuffle $push[[R:[0-9]+]]=, $0, $0, | ||||
; SIMD128-SAME: 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0{{$}} | ; SIMD128-SAME: 2, 3, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1{{$}} | ||||
; SIMD128-NEXT: return $pop[[R]]{{$}} | ; SIMD128-NEXT: return $pop[[R]]{{$}} | ||||
define <8 x i16> @shuffle_undef_v8i16(<8 x i16> %x, <8 x i16> %y) { | define <8 x i16> @shuffle_undef_v8i16(<8 x i16> %x, <8 x i16> %y) { | ||||
%res = shufflevector <8 x i16> %x, <8 x i16> %y, | %res = shufflevector <8 x i16> %x, <8 x i16> %y, | ||||
<8 x i32> <i32 1, i32 undef, i32 undef, i32 undef, | <8 x i32> <i32 1, i32 undef, i32 undef, i32 undef, | ||||
i32 undef, i32 undef, i32 undef, i32 undef> | i32 undef, i32 undef, i32 undef, i32 undef> | ||||
ret <8 x i16> %res | ret <8 x i16> %res | ||||
} | } | ||||
▲ Show 20 Lines • Show All 144 Lines • ▼ Show 20 Lines | %res = shufflevector <4 x i32> %x, <4 x i32> %y, | ||||
<4 x i32> <i32 0, i32 5, i32 2, i32 7> | <4 x i32> <i32 0, i32 5, i32 2, i32 7> | ||||
ret <4 x i32> %res | ret <4 x i32> %res | ||||
} | } | ||||
; CHECK-LABEL: shuffle_undef_v4i32: | ; CHECK-LABEL: shuffle_undef_v4i32: | ||||
; NO-SIMD128-NOT: i8x16 | ; NO-SIMD128-NOT: i8x16 | ||||
; SIMD128-NEXT: .functype shuffle_undef_v4i32 (v128, v128) -> (v128){{$}} | ; SIMD128-NEXT: .functype shuffle_undef_v4i32 (v128, v128) -> (v128){{$}} | ||||
; SIMD128-NEXT: i8x16.shuffle $push[[R:[0-9]+]]=, $0, $0, | ; SIMD128-NEXT: i8x16.shuffle $push[[R:[0-9]+]]=, $0, $0, | ||||
; SIMD128-SAME: 4, 5, 6, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0{{$}} | ; SIMD128-SAME: 4, 5, 6, 7, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3{{$}} | ||||
; SIMD128-NEXT: return $pop[[R]]{{$}} | ; SIMD128-NEXT: return $pop[[R]]{{$}} | ||||
define <4 x i32> @shuffle_undef_v4i32(<4 x i32> %x, <4 x i32> %y) { | define <4 x i32> @shuffle_undef_v4i32(<4 x i32> %x, <4 x i32> %y) { | ||||
%res = shufflevector <4 x i32> %x, <4 x i32> %y, | %res = shufflevector <4 x i32> %x, <4 x i32> %y, | ||||
<4 x i32> <i32 1, i32 undef, i32 undef, i32 undef> | <4 x i32> <i32 1, i32 undef, i32 undef, i32 undef> | ||||
ret <4 x i32> %res | ret <4 x i32> %res | ||||
} | } | ||||
; CHECK-LABEL: build_v4i32: | ; CHECK-LABEL: build_v4i32: | ||||
▲ Show 20 Lines • Show All 132 Lines • ▼ Show 20 Lines | define <2 x i64> @shuffle_v2i64(<2 x i64> %x, <2 x i64> %y) { | ||||
%res = shufflevector <2 x i64> %x, <2 x i64> %y, <2 x i32> <i32 0, i32 3> | %res = shufflevector <2 x i64> %x, <2 x i64> %y, <2 x i32> <i32 0, i32 3> | ||||
ret <2 x i64> %res | ret <2 x i64> %res | ||||
} | } | ||||
; CHECK-LABEL: shuffle_undef_v2i64: | ; CHECK-LABEL: shuffle_undef_v2i64: | ||||
; NO-SIMD128-NOT: i8x16 | ; NO-SIMD128-NOT: i8x16 | ||||
; SIMD128-NEXT: .functype shuffle_undef_v2i64 (v128, v128) -> (v128){{$}} | ; SIMD128-NEXT: .functype shuffle_undef_v2i64 (v128, v128) -> (v128){{$}} | ||||
; SIMD128-NEXT: i8x16.shuffle $push[[R:[0-9]+]]=, $0, $0, | ; SIMD128-NEXT: i8x16.shuffle $push[[R:[0-9]+]]=, $0, $0, | ||||
; SIMD128-SAME: 8, 9, 10, 11, 12, 13, 14, 15, 0, 0, 0, 0, 0, 0, 0, 0{{$}} | ; SIMD128-SAME: 8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6, 7{{$}} | ||||
; SIMD128-NEXT: return $pop[[R]]{{$}} | ; SIMD128-NEXT: return $pop[[R]]{{$}} | ||||
define <2 x i64> @shuffle_undef_v2i64(<2 x i64> %x, <2 x i64> %y) { | define <2 x i64> @shuffle_undef_v2i64(<2 x i64> %x, <2 x i64> %y) { | ||||
%res = shufflevector <2 x i64> %x, <2 x i64> %y, | %res = shufflevector <2 x i64> %x, <2 x i64> %y, | ||||
<2 x i32> <i32 1, i32 undef> | <2 x i32> <i32 1, i32 undef> | ||||
ret <2 x i64> %res | ret <2 x i64> %res | ||||
} | } | ||||
; CHECK-LABEL: build_v2i64: | ; CHECK-LABEL: build_v2i64: | ||||
▲ Show 20 Lines • Show All 132 Lines • ▼ Show 20 Lines | %res = shufflevector <4 x float> %x, <4 x float> %y, | ||||
<4 x i32> <i32 0, i32 5, i32 2, i32 7> | <4 x i32> <i32 0, i32 5, i32 2, i32 7> | ||||
ret <4 x float> %res | ret <4 x float> %res | ||||
} | } | ||||
; CHECK-LABEL: shuffle_undef_v4f32: | ; CHECK-LABEL: shuffle_undef_v4f32: | ||||
; NO-SIMD128-NOT: i8x16 | ; NO-SIMD128-NOT: i8x16 | ||||
; SIMD128-NEXT: .functype shuffle_undef_v4f32 (v128, v128) -> (v128){{$}} | ; SIMD128-NEXT: .functype shuffle_undef_v4f32 (v128, v128) -> (v128){{$}} | ||||
; SIMD128-NEXT: i8x16.shuffle $push[[R:[0-9]+]]=, $0, $0, | ; SIMD128-NEXT: i8x16.shuffle $push[[R:[0-9]+]]=, $0, $0, | ||||
; SIMD128-SAME: 4, 5, 6, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0{{$}} | ; SIMD128-SAME: 4, 5, 6, 7, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3{{$}} | ||||
; SIMD128-NEXT: return $pop[[R]]{{$}} | ; SIMD128-NEXT: return $pop[[R]]{{$}} | ||||
define <4 x float> @shuffle_undef_v4f32(<4 x float> %x, <4 x float> %y) { | define <4 x float> @shuffle_undef_v4f32(<4 x float> %x, <4 x float> %y) { | ||||
%res = shufflevector <4 x float> %x, <4 x float> %y, | %res = shufflevector <4 x float> %x, <4 x float> %y, | ||||
<4 x i32> <i32 1, i32 undef, i32 undef, i32 undef> | <4 x i32> <i32 1, i32 undef, i32 undef, i32 undef> | ||||
ret <4 x float> %res | ret <4 x float> %res | ||||
} | } | ||||
; CHECK-LABEL: build_v4f32: | ; CHECK-LABEL: build_v4f32: | ||||
▲ Show 20 Lines • Show All 133 Lines • ▼ Show 20 Lines | %res = shufflevector <2 x double> %x, <2 x double> %y, | ||||
<2 x i32> <i32 0, i32 3> | <2 x i32> <i32 0, i32 3> | ||||
ret <2 x double> %res | ret <2 x double> %res | ||||
} | } | ||||
; CHECK-LABEL: shuffle_undef_v2f64: | ; CHECK-LABEL: shuffle_undef_v2f64: | ||||
; NO-SIMD128-NOT: i8x16 | ; NO-SIMD128-NOT: i8x16 | ||||
; SIMD128-NEXT: .functype shuffle_undef_v2f64 (v128, v128) -> (v128){{$}} | ; SIMD128-NEXT: .functype shuffle_undef_v2f64 (v128, v128) -> (v128){{$}} | ||||
; SIMD128-NEXT: i8x16.shuffle $push[[R:[0-9]+]]=, $0, $0, | ; SIMD128-NEXT: i8x16.shuffle $push[[R:[0-9]+]]=, $0, $0, | ||||
; SIMD128-SAME: 8, 9, 10, 11, 12, 13, 14, 15, 0, 0, 0, 0, 0, 0, 0, 0{{$}} | ; SIMD128-SAME: 8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6, 7{{$}} | ||||
; SIMD128-NEXT: return $pop[[R]]{{$}} | ; SIMD128-NEXT: return $pop[[R]]{{$}} | ||||
define <2 x double> @shuffle_undef_v2f64(<2 x double> %x, <2 x double> %y) { | define <2 x double> @shuffle_undef_v2f64(<2 x double> %x, <2 x double> %y) { | ||||
%res = shufflevector <2 x double> %x, <2 x double> %y, | %res = shufflevector <2 x double> %x, <2 x double> %y, | ||||
<2 x i32> <i32 1, i32 undef> | <2 x i32> <i32 1, i32 undef> | ||||
ret <2 x double> %res | ret <2 x double> %res | ||||
} | } | ||||
; CHECK-LABEL: build_v2f64: | ; CHECK-LABEL: build_v2f64: | ||||
Show All 10 Lines |