Skip to content

Commit 06c2b9d

Browse files
authored
Merge pull request #101 from alexcrichton/more-wasm-updates
Penultimate wasm SIMD update (hopefully)
2 parents 0ed6038 + 05751c8 commit 06c2b9d

File tree

21 files changed

+623
-1048
lines changed

21 files changed

+623
-1048
lines changed

clang/include/clang/Basic/BuiltinsWebAssembly.def

-7
Original file line numberDiff line numberDiff line change
@@ -191,13 +191,6 @@ TARGET_BUILTIN(__builtin_wasm_narrow_u_i8x16_i16x8, "V16UcV8UsV8Us", "nc", "simd
191191
TARGET_BUILTIN(__builtin_wasm_narrow_s_i16x8_i32x4, "V8sV4iV4i", "nc", "simd128")
192192
TARGET_BUILTIN(__builtin_wasm_narrow_u_i16x8_i32x4, "V8UsV4UiV4Ui", "nc", "simd128")
193193

194-
TARGET_BUILTIN(__builtin_wasm_extend_low_s_i32x4_i64x2, "V2LLiV4i", "nc", "simd128")
195-
TARGET_BUILTIN(__builtin_wasm_extend_high_s_i32x4_i64x2, "V2LLiV4i", "nc", "simd128")
196-
TARGET_BUILTIN(__builtin_wasm_extend_low_u_i32x4_i64x2, "V2LLUiV4Ui", "nc", "simd128")
197-
TARGET_BUILTIN(__builtin_wasm_extend_high_u_i32x4_i64x2, "V2LLUiV4Ui", "nc", "simd128")
198-
199-
TARGET_BUILTIN(__builtin_wasm_convert_low_s_i32x4_f64x2, "V2dV4i", "nc", "simd128")
200-
TARGET_BUILTIN(__builtin_wasm_convert_low_u_i32x4_f64x2, "V2dV4Ui", "nc", "simd128")
201194
TARGET_BUILTIN(__builtin_wasm_trunc_sat_zero_s_f64x2_i32x4, "V4iV2d", "nc", "simd128")
202195
TARGET_BUILTIN(__builtin_wasm_trunc_sat_zero_u_f64x2_i32x4, "V4UiV2d", "nc", "simd128")
203196
TARGET_BUILTIN(__builtin_wasm_demote_zero_f64x2_f32x4, "V4fV2d", "nc", "simd128")

clang/lib/CodeGen/CGBuiltin.cpp

+20-50
Original file line numberDiff line numberDiff line change
@@ -16756,8 +16756,8 @@ Value *CodeGenFunction::EmitWebAssemblyBuiltinExpr(unsigned BuiltinID,
1675616756
case WebAssembly::BI__builtin_wasm_trunc_saturate_s_i32x4_f32x4: {
1675716757
Value *Src = EmitScalarExpr(E->getArg(0));
1675816758
llvm::Type *ResT = ConvertType(E->getType());
16759-
Function *Callee = CGM.getIntrinsic(Intrinsic::wasm_trunc_saturate_signed,
16760-
{ResT, Src->getType()});
16759+
Function *Callee =
16760+
CGM.getIntrinsic(Intrinsic::fptosi_sat, {ResT, Src->getType()});
1676116761
return Builder.CreateCall(Callee, {Src});
1676216762
}
1676316763
case WebAssembly::BI__builtin_wasm_trunc_saturate_u_i32_f32:
@@ -16767,8 +16767,8 @@ Value *CodeGenFunction::EmitWebAssemblyBuiltinExpr(unsigned BuiltinID,
1676716767
case WebAssembly::BI__builtin_wasm_trunc_saturate_u_i32x4_f32x4: {
1676816768
Value *Src = EmitScalarExpr(E->getArg(0));
1676916769
llvm::Type *ResT = ConvertType(E->getType());
16770-
Function *Callee = CGM.getIntrinsic(Intrinsic::wasm_trunc_saturate_unsigned,
16771-
{ResT, Src->getType()});
16770+
Function *Callee =
16771+
CGM.getIntrinsic(Intrinsic::fptoui_sat, {ResT, Src->getType()});
1677216772
return Builder.CreateCall(Callee, {Src});
1677316773
}
1677416774
case WebAssembly::BI__builtin_wasm_min_f32:
@@ -16819,19 +16819,19 @@ Value *CodeGenFunction::EmitWebAssemblyBuiltinExpr(unsigned BuiltinID,
1681916819
switch (BuiltinID) {
1682016820
case WebAssembly::BI__builtin_wasm_ceil_f32x4:
1682116821
case WebAssembly::BI__builtin_wasm_ceil_f64x2:
16822-
IntNo = Intrinsic::wasm_ceil;
16822+
IntNo = Intrinsic::ceil;
1682316823
break;
1682416824
case WebAssembly::BI__builtin_wasm_floor_f32x4:
1682516825
case WebAssembly::BI__builtin_wasm_floor_f64x2:
16826-
IntNo = Intrinsic::wasm_floor;
16826+
IntNo = Intrinsic::floor;
1682716827
break;
1682816828
case WebAssembly::BI__builtin_wasm_trunc_f32x4:
1682916829
case WebAssembly::BI__builtin_wasm_trunc_f64x2:
16830-
IntNo = Intrinsic::wasm_trunc;
16830+
IntNo = Intrinsic::trunc;
1683116831
break;
1683216832
case WebAssembly::BI__builtin_wasm_nearest_f32x4:
1683316833
case WebAssembly::BI__builtin_wasm_nearest_f64x2:
16834-
IntNo = Intrinsic::wasm_nearest;
16834+
IntNo = Intrinsic::nearbyint;
1683516835
break;
1683616836
default:
1683716837
llvm_unreachable("unexpected builtin ID");
@@ -17158,58 +17158,28 @@ Value *CodeGenFunction::EmitWebAssemblyBuiltinExpr(unsigned BuiltinID,
1715817158
CGM.getIntrinsic(IntNo, {ConvertType(E->getType()), Low->getType()});
1715917159
return Builder.CreateCall(Callee, {Low, High});
1716017160
}
17161-
case WebAssembly::BI__builtin_wasm_extend_low_s_i32x4_i64x2:
17162-
case WebAssembly::BI__builtin_wasm_extend_high_s_i32x4_i64x2:
17163-
case WebAssembly::BI__builtin_wasm_extend_low_u_i32x4_i64x2:
17164-
case WebAssembly::BI__builtin_wasm_extend_high_u_i32x4_i64x2: {
17165-
Value *Vec = EmitScalarExpr(E->getArg(0));
17166-
unsigned IntNo;
17167-
switch (BuiltinID) {
17168-
case WebAssembly::BI__builtin_wasm_extend_low_s_i32x4_i64x2:
17169-
IntNo = Intrinsic::wasm_extend_low_signed;
17170-
break;
17171-
case WebAssembly::BI__builtin_wasm_extend_high_s_i32x4_i64x2:
17172-
IntNo = Intrinsic::wasm_extend_high_signed;
17173-
break;
17174-
case WebAssembly::BI__builtin_wasm_extend_low_u_i32x4_i64x2:
17175-
IntNo = Intrinsic::wasm_extend_low_unsigned;
17176-
break;
17177-
case WebAssembly::BI__builtin_wasm_extend_high_u_i32x4_i64x2:
17178-
IntNo = Intrinsic::wasm_extend_high_unsigned;
17179-
break;
17180-
}
17181-
Function *Callee = CGM.getIntrinsic(IntNo);
17182-
return Builder.CreateCall(Callee, Vec);
17183-
}
17184-
case WebAssembly::BI__builtin_wasm_convert_low_s_i32x4_f64x2:
17185-
case WebAssembly::BI__builtin_wasm_convert_low_u_i32x4_f64x2: {
17186-
Value *Vec = EmitScalarExpr(E->getArg(0));
17187-
unsigned IntNo;
17188-
switch (BuiltinID) {
17189-
case WebAssembly::BI__builtin_wasm_convert_low_s_i32x4_f64x2:
17190-
IntNo = Intrinsic::wasm_convert_low_signed;
17191-
break;
17192-
case WebAssembly::BI__builtin_wasm_convert_low_u_i32x4_f64x2:
17193-
IntNo = Intrinsic::wasm_convert_low_unsigned;
17194-
break;
17195-
}
17196-
Function *Callee = CGM.getIntrinsic(IntNo);
17197-
return Builder.CreateCall(Callee, Vec);
17198-
}
1719917161
case WebAssembly::BI__builtin_wasm_trunc_sat_zero_s_f64x2_i32x4:
1720017162
case WebAssembly::BI__builtin_wasm_trunc_sat_zero_u_f64x2_i32x4: {
1720117163
Value *Vec = EmitScalarExpr(E->getArg(0));
1720217164
unsigned IntNo;
1720317165
switch (BuiltinID) {
1720417166
case WebAssembly::BI__builtin_wasm_trunc_sat_zero_s_f64x2_i32x4:
17205-
IntNo = Intrinsic::wasm_trunc_sat_zero_signed;
17167+
IntNo = Intrinsic::fptosi_sat;
1720617168
break;
1720717169
case WebAssembly::BI__builtin_wasm_trunc_sat_zero_u_f64x2_i32x4:
17208-
IntNo = Intrinsic::wasm_trunc_sat_zero_unsigned;
17170+
IntNo = Intrinsic::fptoui_sat;
1720917171
break;
1721017172
}
17211-
Function *Callee = CGM.getIntrinsic(IntNo);
17212-
return Builder.CreateCall(Callee, Vec);
17173+
llvm::Type *SrcT = Vec->getType();
17174+
llvm::Type *TruncT =
17175+
SrcT->getWithNewType(llvm::IntegerType::get(getLLVMContext(), 32));
17176+
Function *Callee = CGM.getIntrinsic(IntNo, {TruncT, SrcT});
17177+
Value *Trunc = Builder.CreateCall(Callee, Vec);
17178+
Value *Splat = Builder.CreateVectorSplat(2, Builder.getInt32(0));
17179+
Value *ConcatMask =
17180+
llvm::ConstantVector::get({Builder.getInt32(0), Builder.getInt32(1),
17181+
Builder.getInt32(2), Builder.getInt32(3)});
17182+
return Builder.CreateShuffleVector(Trunc, Splat, ConcatMask);
1721317183
}
1721417184
case WebAssembly::BI__builtin_wasm_demote_zero_f64x2_f32x4: {
1721517185
Value *Vec = EmitScalarExpr(E->getArg(0));

clang/test/CodeGen/builtins-wasm.c

+24-58
Original file line numberDiff line numberDiff line change
@@ -123,49 +123,49 @@ long long trunc_u_i64_f64(double f) {
123123

124124
int trunc_saturate_s_i32_f32(float f) {
125125
return __builtin_wasm_trunc_saturate_s_i32_f32(f);
126-
// WEBASSEMBLY: call i32 @llvm.wasm.trunc.saturate.signed.i32.f32(float %f)
126+
// WEBASSEMBLY: call i32 @llvm.fptosi.sat.i32.f32(float %f)
127127
// WEBASSEMBLY-NEXT: ret
128128
}
129129

130130
int trunc_saturate_u_i32_f32(float f) {
131131
return __builtin_wasm_trunc_saturate_u_i32_f32(f);
132-
// WEBASSEMBLY: call i32 @llvm.wasm.trunc.saturate.unsigned.i32.f32(float %f)
132+
// WEBASSEMBLY: call i32 @llvm.fptoui.sat.i32.f32(float %f)
133133
// WEBASSEMBLY-NEXT: ret
134134
}
135135

136136
int trunc_saturate_s_i32_f64(double f) {
137137
return __builtin_wasm_trunc_saturate_s_i32_f64(f);
138-
// WEBASSEMBLY: call i32 @llvm.wasm.trunc.saturate.signed.i32.f64(double %f)
138+
// WEBASSEMBLY: call i32 @llvm.fptosi.sat.i32.f64(double %f)
139139
// WEBASSEMBLY-NEXT: ret
140140
}
141141

142142
int trunc_saturate_u_i32_f64(double f) {
143143
return __builtin_wasm_trunc_saturate_u_i32_f64(f);
144-
// WEBASSEMBLY: call i32 @llvm.wasm.trunc.saturate.unsigned.i32.f64(double %f)
144+
// WEBASSEMBLY: call i32 @llvm.fptoui.sat.i32.f64(double %f)
145145
// WEBASSEMBLY-NEXT: ret
146146
}
147147

148148
long long trunc_saturate_s_i64_f32(float f) {
149149
return __builtin_wasm_trunc_saturate_s_i64_f32(f);
150-
// WEBASSEMBLY: call i64 @llvm.wasm.trunc.saturate.signed.i64.f32(float %f)
150+
// WEBASSEMBLY: call i64 @llvm.fptosi.sat.i64.f32(float %f)
151151
// WEBASSEMBLY-NEXT: ret
152152
}
153153

154154
long long trunc_saturate_u_i64_f32(float f) {
155155
return __builtin_wasm_trunc_saturate_u_i64_f32(f);
156-
// WEBASSEMBLY: call i64 @llvm.wasm.trunc.saturate.unsigned.i64.f32(float %f)
156+
// WEBASSEMBLY: call i64 @llvm.fptoui.sat.i64.f32(float %f)
157157
// WEBASSEMBLY-NEXT: ret
158158
}
159159

160160
long long trunc_saturate_s_i64_f64(double f) {
161161
return __builtin_wasm_trunc_saturate_s_i64_f64(f);
162-
// WEBASSEMBLY: call i64 @llvm.wasm.trunc.saturate.signed.i64.f64(double %f)
162+
// WEBASSEMBLY: call i64 @llvm.fptosi.sat.i64.f64(double %f)
163163
// WEBASSEMBLY-NEXT: ret
164164
}
165165

166166
long long trunc_saturate_u_i64_f64(double f) {
167167
return __builtin_wasm_trunc_saturate_u_i64_f64(f);
168-
// WEBASSEMBLY: call i64 @llvm.wasm.trunc.saturate.unsigned.i64.f64(double %f)
168+
// WEBASSEMBLY: call i64 @llvm.fptoui.sat.i64.f64(double %f)
169169
// WEBASSEMBLY-NEXT: ret
170170
}
171171

@@ -792,49 +792,49 @@ f64x2 pmax_f64x2(f64x2 x, f64x2 y) {
792792

793793
f32x4 ceil_f32x4(f32x4 x) {
794794
return __builtin_wasm_ceil_f32x4(x);
795-
// WEBASSEMBLY: call <4 x float> @llvm.wasm.ceil.v4f32(<4 x float> %x)
795+
// WEBASSEMBLY: call <4 x float> @llvm.ceil.v4f32(<4 x float> %x)
796796
// WEBASSEMBLY: ret
797797
}
798798

799799
f32x4 floor_f32x4(f32x4 x) {
800800
return __builtin_wasm_floor_f32x4(x);
801-
// WEBASSEMBLY: call <4 x float> @llvm.wasm.floor.v4f32(<4 x float> %x)
801+
// WEBASSEMBLY: call <4 x float> @llvm.floor.v4f32(<4 x float> %x)
802802
// WEBASSEMBLY: ret
803803
}
804804

805805
f32x4 trunc_f32x4(f32x4 x) {
806806
return __builtin_wasm_trunc_f32x4(x);
807-
// WEBASSEMBLY: call <4 x float> @llvm.wasm.trunc.v4f32(<4 x float> %x)
807+
// WEBASSEMBLY: call <4 x float> @llvm.trunc.v4f32(<4 x float> %x)
808808
// WEBASSEMBLY: ret
809809
}
810810

811811
f32x4 nearest_f32x4(f32x4 x) {
812812
return __builtin_wasm_nearest_f32x4(x);
813-
// WEBASSEMBLY: call <4 x float> @llvm.wasm.nearest.v4f32(<4 x float> %x)
813+
// WEBASSEMBLY: call <4 x float> @llvm.nearbyint.v4f32(<4 x float> %x)
814814
// WEBASSEMBLY: ret
815815
}
816816

817817
f64x2 ceil_f64x2(f64x2 x) {
818818
return __builtin_wasm_ceil_f64x2(x);
819-
// WEBASSEMBLY: call <2 x double> @llvm.wasm.ceil.v2f64(<2 x double> %x)
819+
// WEBASSEMBLY: call <2 x double> @llvm.ceil.v2f64(<2 x double> %x)
820820
// WEBASSEMBLY: ret
821821
}
822822

823823
f64x2 floor_f64x2(f64x2 x) {
824824
return __builtin_wasm_floor_f64x2(x);
825-
// WEBASSEMBLY: call <2 x double> @llvm.wasm.floor.v2f64(<2 x double> %x)
825+
// WEBASSEMBLY: call <2 x double> @llvm.floor.v2f64(<2 x double> %x)
826826
// WEBASSEMBLY: ret
827827
}
828828

829829
f64x2 trunc_f64x2(f64x2 x) {
830830
return __builtin_wasm_trunc_f64x2(x);
831-
// WEBASSEMBLY: call <2 x double> @llvm.wasm.trunc.v2f64(<2 x double> %x)
831+
// WEBASSEMBLY: call <2 x double> @llvm.trunc.v2f64(<2 x double> %x)
832832
// WEBASSEMBLY: ret
833833
}
834834

835835
f64x2 nearest_f64x2(f64x2 x) {
836836
return __builtin_wasm_nearest_f64x2(x);
837-
// WEBASSEMBLY: call <2 x double> @llvm.wasm.nearest.v2f64(<2 x double> %x)
837+
// WEBASSEMBLY: call <2 x double> @llvm.nearbyint.v2f64(<2 x double> %x)
838838
// WEBASSEMBLY: ret
839839
}
840840

@@ -852,13 +852,13 @@ f64x2 sqrt_f64x2(f64x2 x) {
852852

853853
i32x4 trunc_saturate_s_i32x4_f32x4(f32x4 f) {
854854
return __builtin_wasm_trunc_saturate_s_i32x4_f32x4(f);
855-
// WEBASSEMBLY: call <4 x i32> @llvm.wasm.trunc.saturate.signed.v4i32.v4f32(<4 x float> %f)
855+
// WEBASSEMBLY: call <4 x i32> @llvm.fptosi.sat.v4i32.v4f32(<4 x float> %f)
856856
// WEBASSEMBLY-NEXT: ret
857857
}
858858

859859
i32x4 trunc_saturate_u_i32x4_f32x4(f32x4 f) {
860860
return __builtin_wasm_trunc_saturate_u_i32x4_f32x4(f);
861-
// WEBASSEMBLY: call <4 x i32> @llvm.wasm.trunc.saturate.unsigned.v4i32.v4f32(<4 x float> %f)
861+
// WEBASSEMBLY: call <4 x i32> @llvm.fptoui.sat.v4i32.v4f32(<4 x float> %f)
862862
// WEBASSEMBLY-NEXT: ret
863863
}
864864

@@ -890,52 +890,18 @@ u16x8 narrow_u_i16x8_i32x4(u32x4 low, u32x4 high) {
890890
// WEBASSEMBLY: ret
891891
}
892892

893-
i64x2 extend_low_s_i32x4_i64x2(i32x4 x) {
894-
return __builtin_wasm_extend_low_s_i32x4_i64x2(x);
895-
// WEBASSEMBLY: call <2 x i64> @llvm.wasm.extend.low.signed(<4 x i32> %x)
896-
// WEBASSEMBLY: ret
897-
}
898-
899-
i64x2 extend_high_s_i32x4_i64x2(i32x4 x) {
900-
return __builtin_wasm_extend_high_s_i32x4_i64x2(x);
901-
// WEBASSEMBLY: call <2 x i64> @llvm.wasm.extend.high.signed(<4 x i32> %x)
902-
// WEBASSEMBLY: ret
903-
}
904-
905-
u64x2 extend_low_u_i32x4_i64x2(u32x4 x) {
906-
return __builtin_wasm_extend_low_u_i32x4_i64x2(x);
907-
// WEBASSEMBLY: call <2 x i64> @llvm.wasm.extend.low.unsigned(<4 x i32> %x)
908-
// WEBASSEMBLY: ret
909-
}
910-
911-
u64x2 extend_high_u_i32x4_i64x2(u32x4 x) {
912-
return __builtin_wasm_extend_high_u_i32x4_i64x2(x);
913-
// WEBASSEMBLY: call <2 x i64> @llvm.wasm.extend.high.unsigned(<4 x i32> %x)
914-
// WEBASSEMBLY: ret
915-
}
916-
917-
f64x2 convert_low_s_i32x4_f64x2(i32x4 x) {
918-
return __builtin_wasm_convert_low_s_i32x4_f64x2(x);
919-
// WEBASSEMBLY: call <2 x double> @llvm.wasm.convert.low.signed(<4 x i32> %x)
920-
// WEBASSEMBLY: ret
921-
}
922-
923-
f64x2 convert_low_u_i32x4_f64x2(u32x4 x) {
924-
return __builtin_wasm_convert_low_u_i32x4_f64x2(x);
925-
// WEBASSEMBLY: call <2 x double> @llvm.wasm.convert.low.unsigned(<4 x i32> %x)
926-
// WEBASSEMBLY: ret
927-
}
928-
929893
i32x4 trunc_sat_zero_s_f64x2_i32x4(f64x2 x) {
930894
return __builtin_wasm_trunc_sat_zero_s_f64x2_i32x4(x);
931-
// WEBASSEMBLY: call <4 x i32> @llvm.wasm.trunc.sat.zero.signed(<2 x double> %x)
932-
// WEBASSEMBLY: ret
895+
// WEBASSEMBLY: %0 = tail call <2 x i32> @llvm.fptosi.sat.v2i32.v2f64(<2 x double> %x)
896+
// WEBASSEMBLY: %1 = shufflevector <2 x i32> %0, <2 x i32> zeroinitializer, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
897+
// WEBASSEMBLY: ret <4 x i32> %1
933898
}
934899

935900
u32x4 trunc_sat_zero_u_f64x2_i32x4(f64x2 x) {
936901
return __builtin_wasm_trunc_sat_zero_u_f64x2_i32x4(x);
937-
// WEBASSEMBLY: call <4 x i32> @llvm.wasm.trunc.sat.zero.unsigned(<2 x double> %x)
938-
// WEBASSEMBLY: ret
902+
// WEBASSEMBLY: %0 = tail call <2 x i32> @llvm.fptoui.sat.v2i32.v2f64(<2 x double> %x)
903+
// WEBASSEMBLY: %1 = shufflevector <2 x i32> %0, <2 x i32> zeroinitializer, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
904+
// WEBASSEMBLY: ret <4 x i32> %1
939905
}
940906

941907
f32x4 wasm_demote_zero_f64x2_f32x4(f64x2 x) {

llvm/include/llvm/IR/IntrinsicsWebAssembly.td

-43
Original file line numberDiff line numberDiff line change
@@ -157,17 +157,6 @@ def int_wasm_narrow_unsigned :
157157
[llvm_anyvector_ty, LLVMMatchType<1>],
158158
[IntrNoMem, IntrSpeculatable]>;
159159

160-
// TODO: Replace these intrinsics with normal ISel patterns once i32x4 to i64x2
161-
// extending is merged to the proposal.
162-
def int_wasm_extend_low_signed :
163-
Intrinsic<[llvm_v2i64_ty], [llvm_v4i32_ty], [IntrNoMem, IntrSpeculatable]>;
164-
def int_wasm_extend_high_signed :
165-
Intrinsic<[llvm_v2i64_ty], [llvm_v4i32_ty], [IntrNoMem, IntrSpeculatable]>;
166-
def int_wasm_extend_low_unsigned :
167-
Intrinsic<[llvm_v2i64_ty], [llvm_v4i32_ty], [IntrNoMem, IntrSpeculatable]>;
168-
def int_wasm_extend_high_unsigned :
169-
Intrinsic<[llvm_v2i64_ty], [llvm_v4i32_ty], [IntrNoMem, IntrSpeculatable]>;
170-
171160
def int_wasm_q15mulr_sat_signed :
172161
Intrinsic<[llvm_v8i16_ty],
173162
[llvm_v8i16_ty, llvm_v8i16_ty],
@@ -183,26 +172,6 @@ def int_wasm_pmax :
183172
[LLVMMatchType<0>, LLVMMatchType<0>],
184173
[IntrNoMem, IntrSpeculatable]>;
185174

186-
// TODO: Replace these instrinsics with normal ISel patterns once the
187-
// rounding instructions are merged to the proposal
188-
// (https://github.com/WebAssembly/simd/pull/232).
189-
def int_wasm_ceil :
190-
Intrinsic<[llvm_anyvector_ty],
191-
[LLVMMatchType<0>],
192-
[IntrNoMem, IntrSpeculatable]>;
193-
def int_wasm_floor :
194-
Intrinsic<[llvm_anyvector_ty],
195-
[LLVMMatchType<0>],
196-
[IntrNoMem, IntrSpeculatable]>;
197-
def int_wasm_trunc :
198-
Intrinsic<[llvm_anyvector_ty],
199-
[LLVMMatchType<0>],
200-
[IntrNoMem, IntrSpeculatable]>;
201-
def int_wasm_nearest :
202-
Intrinsic<[llvm_anyvector_ty],
203-
[LLVMMatchType<0>],
204-
[IntrNoMem, IntrSpeculatable]>;
205-
206175
// TODO: Replace these intrinsic with normal ISel patterns once the
207176
// load_zero instructions are merged to the proposal.
208177
def int_wasm_load32_zero :
@@ -295,18 +264,6 @@ def int_wasm_extadd_pairwise_unsigned :
295264
[IntrNoMem, IntrSpeculatable]>;
296265

297266
// TODO: Remove these if possible if they are merged to the spec.
298-
def int_wasm_convert_low_signed :
299-
Intrinsic<[llvm_v2f64_ty], [llvm_v4i32_ty],
300-
[IntrNoMem, IntrSpeculatable]>;
301-
def int_wasm_convert_low_unsigned :
302-
Intrinsic<[llvm_v2f64_ty], [llvm_v4i32_ty],
303-
[IntrNoMem, IntrSpeculatable]>;
304-
def int_wasm_trunc_sat_zero_signed :
305-
Intrinsic<[llvm_v4i32_ty], [llvm_v2f64_ty],
306-
[IntrNoMem, IntrSpeculatable]>;
307-
def int_wasm_trunc_sat_zero_unsigned :
308-
Intrinsic<[llvm_v4i32_ty], [llvm_v2f64_ty],
309-
[IntrNoMem, IntrSpeculatable]>;
310267
def int_wasm_demote_zero :
311268
Intrinsic<[llvm_v4f32_ty], [llvm_v2f64_ty],
312269
[IntrNoMem, IntrSpeculatable]>;

0 commit comments

Comments
 (0)