Skip to content

Commit

Permalink
rename helper function
Browse files Browse the repository at this point in the history
  • Loading branch information
ghehg committed Nov 11, 2024
1 parent ad787bd commit a6a6e41
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion clang/include/clang/CIR/Dialect/IR/CIRTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ class StructType

bool isAnyFloatingPointType(mlir::Type t);
bool isFPOrFPVectorTy(mlir::Type);
bool isCIRIntOrIntVectorTy(mlir::Type);
bool isIntOrIntVectorTy(mlir::Type);
} // namespace cir

mlir::ParseResult parseAddrSpaceAttribute(mlir::AsmParser &p,
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/CIR/CodeGen/CIRGenBuiltin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1257,7 +1257,7 @@ RValue CIRGenFunction::emitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID,

case Builtin::BI__builtin_elementwise_abs: {
mlir::Type cirTy = ConvertType(E->getArg(0)->getType());
bool isIntTy = cir::isCIRIntOrIntVectorTy(cirTy);
bool isIntTy = cir::isIntOrIntVectorTy(cirTy);
if (!isIntTy) {
if (cir::isAnyFloatingPointType(cirTy)) {
return emitUnaryFPBuiltin<cir::FAbsOp>(*this, *E);
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/CIR/Dialect/IR/CIRTypes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@ bool cir::isFPOrFPVectorTy(mlir::Type t) {
// CIR Integer and Integer Vector type helpers
//===----------------------------------------------------------------------===//

bool cir::isCIRIntOrIntVectorTy(mlir::Type t) {
bool cir::isIntOrIntVectorTy(mlir::Type t) {

if (isa<cir::VectorType>(t)) {
return isa<cir::IntType>(mlir::dyn_cast<cir::VectorType>(t).getEltType());
Expand Down

0 comments on commit a6a6e41

Please sign in to comment.