diff --git a/clang/lib/CIR/CodeGen/CIRGenBuiltin.cpp b/clang/lib/CIR/CodeGen/CIRGenBuiltin.cpp index 987f20629bea..553e79ded11d 100644 --- a/clang/lib/CIR/CodeGen/CIRGenBuiltin.cpp +++ b/clang/lib/CIR/CodeGen/CIRGenBuiltin.cpp @@ -1349,13 +1349,7 @@ RValue CIRGenFunction::emitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID, mlir::Type cirTy = convertType(E->getArg(0)->getType()); bool isIntTy = cir::isIntOrIntVectorTy(cirTy); if (!isIntTy) { - mlir::Type eltTy = cirTy; - if (mlir::isa(cirTy)) - eltTy = mlir::cast(cirTy).getEltType(); - if (mlir::isa(eltTy)) { - return emitUnaryMaybeConstrainedFPBuiltin(*this, *E); - } - llvm_unreachable("unsupported type for BI__builtin_elementwise_abs"); + return emitUnaryFPBuiltin(*this, *E); } mlir::Value arg = emitScalarExpr(E->getArg(0)); auto call = getBuilder().create(getLoc(E->getExprLoc()),