@@ -1659,7 +1659,6 @@ bool llvm::canConstantFoldCallTo(const CallBase *Call, const Function *F) {
1659
1659
case Intrinsic::aarch64_sve_convert_from_svbool:
1660
1660
case Intrinsic::wasm_alltrue:
1661
1661
case Intrinsic::wasm_anytrue:
1662
- case Intrinsic::wasm_dot:
1663
1662
// WebAssembly float semantics are always known
1664
1663
case Intrinsic::wasm_trunc_signed:
1665
1664
case Intrinsic::wasm_trunc_unsigned:
@@ -3990,30 +3989,6 @@ static Constant *ConstantFoldFixedVectorCall(
3990
3989
}
3991
3990
return ConstantVector::get (Result);
3992
3991
}
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
- }
4017
3992
default :
4018
3993
break ;
4019
3994
}
0 commit comments