================ @@ -190,6 +190,26 @@ RValue CIRGenFunction::emitBuiltinExpr(const GlobalDecl &gd, unsigned builtinID, expectedValue, probAttr); return RValue::get(result); } + + case Builtin::BI__builtin_bswap16: + case Builtin::BI__builtin_bswap32: + case Builtin::BI__builtin_bswap64: + case Builtin::BI_byteswap_ushort: + case Builtin::BI_byteswap_ulong: + case Builtin::BI_byteswap_uint64: { + mlir::Value arg = emitScalarExpr(e->getArg(0)); + return RValue::get( + builder.create<cir::ByteSwapOp>(getLoc(e->getSourceRange()), arg)); ---------------- xlauko wrote:
Lets pull out `mlir::Location loc = getLoc(e->getSourceRange())` to the beginning of the function and use it throughout the function. This will reduce a lot of unnecessary indent. https://github.com/llvm/llvm-project/pull/147200 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits