@@ -1659,7 +1659,6 @@ bool llvm::canConstantFoldCallTo(const CallBase *Call, const Function *F) {
16591659 case Intrinsic::aarch64_sve_convert_from_svbool:
16601660 case Intrinsic::wasm_alltrue:
16611661 case Intrinsic::wasm_anytrue:
1662- case Intrinsic::wasm_dot:
16631662 // WebAssembly float semantics are always known
16641663 case Intrinsic::wasm_trunc_signed:
16651664 case Intrinsic::wasm_trunc_unsigned:
@@ -3990,30 +3989,6 @@ static Constant *ConstantFoldFixedVectorCall(
39903989 }
39913990 return ConstantVector::get (Result);
39923991 }
3993- case Intrinsic::wasm_dot: {
3994- unsigned NumElements =
3995- cast<FixedVectorType>(Operands[0 ]->getType ())->getNumElements ();
3996-
3997- assert (NumElements == 8 && Result.size () == 4 &&
3998- " wasm dot takes i16x8 and produces i32x4" );
3999- assert (Ty->isIntegerTy ());
4000- int32_t MulVector[8 ];
4001-
4002- for (unsigned I = 0 ; I < NumElements; ++I) {
4003- ConstantInt *Elt0 =
4004- cast<ConstantInt>(Operands[0 ]->getAggregateElement (I));
4005- ConstantInt *Elt1 =
4006- cast<ConstantInt>(Operands[1 ]->getAggregateElement (I));
4007-
4008- MulVector[I] = Elt0->getSExtValue () * Elt1->getSExtValue ();
4009- }
4010- for (unsigned I = 0 ; I < Result.size (); I++) {
4011- int32_t IAdd = MulVector[I * 2 ] + MulVector[I * 2 + 1 ];
4012- Result[I] = ConstantInt::get (Ty, IAdd);
4013- }
4014-
4015- return ConstantVector::get (Result);
4016- }
40173992 default :
40183993 break ;
40193994 }
0 commit comments