This patch is to add PPC vec_max, vec_min, vec_madd and vec_nmsub intrinsics.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
@kkwli0, I can't build with this change. I see the following messages in my log file:
[7018/7446] Building CXX object tools/flang/lib/Optimizer/Builder/CMakeFiles/obj.FIRBuilder.dir/PPCIntrinsicCall.cpp.o FAILED: tools/flang/lib/Optimizer/Builder/CMakeFiles/obj.FIRBuilder.dir/PPCIntrinsicCall.cpp.o /home/sw/thirdparty/gcc/gcc-9.3.0/linux86-64/bin/g++ -DFLANG_INCLUDE_TESTS=1 -DFLANG_LITTLE_ENDIAN=1 -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D_LIBCPP_ENABLE_ASSERTIONS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/local/home/psteinfeld/main/test/build/tools/flang/lib/Optimizer/Builder -I/local/home/psteinfeld/main/test/flang/lib/Optimizer/Builder -I/local/home/psteinfeld/main/test/flang/include -I/local/home/psteinfeld/main/test/build/tools/flang/include -I/local/home/psteinfeld/main/test/build/include -I/local/home/psteinfeld/main/test/llvm/include -isystem /local/home/psteinfeld/main/test/llvm/../mlir/include -isystem /local/home/psteinfeld/main/test/build/tools/mlir/include -isystem /local/home/psteinfeld/main/test/build/tools/clang/include -isystem /local/home/psteinfeld/main/test/llvm/../clang/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -Werror -Wno-deprecated-copy -Wno-ctad-maybe-unsupported -fno-strict-aliasing -fno-semantic-interposition -O3 -DNDEBUG -std=c++17 -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -MD -MT tools/flang/lib/Optimizer/Builder/CMakeFiles/obj.FIRBuilder.dir/PPCIntrinsicCall.cpp.o -MF tools/flang/lib/Optimizer/Builder/CMakeFiles/obj.FIRBuilder.dir/PPCIntrinsicCall.cpp.o.d -o tools/flang/lib/Optimizer/Builder/CMakeFiles/obj.FIRBuilder.dir/PPCIntrinsicCall.cpp.o -c /local/home/psteinfeld/main/test/flang/lib/Optimizer/Builder/PPCIntrinsicCall.cpp In file included from /local/home/psteinfeld/main/test/flang/include/flang/Optimizer/Builder/PPCIntrinsicCall.h:13, from /local/home/psteinfeld/main/test/flang/lib/Optimizer/Builder/PPCIntrinsicCall.cpp:16: /local/home/psteinfeld/main/test/flang/include/flang/Optimizer/Builder/IntrinsicCall.h: In function ‘mlir::Type fir::getTypeHelper(mlir::MLIRContext*, fir::FirOpBuilder&, fir::ParamTypeId, int)’: /local/home/psteinfeld/main/test/flang/include/flang/Optimizer/Builder/IntrinsicCall.h:578:1: error: control reaches end of non-void function [-Werror=return-type] 578 | } | ^ At global scope: cc1plus: error: unrecognized command line option ‘-Wno-ctad-maybe-unsupported’ [-Werror] cc1plus: all warnings being treated as errors
Comment Actions
@PeteSteinfeld I am building on x86_64 with gcc with the following change.
diff --git a/flang/include/flang/Optimizer/Builder/IntrinsicCall.h b/flang/include/flang/Optimizer/Builder/IntrinsicCall.h index 01df6d1f239d..17abfef92fd2 100644 --- a/flang/include/flang/Optimizer/Builder/IntrinsicCall.h +++ b/flang/include/flang/Optimizer/Builder/IntrinsicCall.h @@ -560,21 +560,23 @@ static inline mlir::Type getTypeHelper(mlir::MLIRContext *context, break; } + mlir::Type fTy; switch (typeId) { case ParamTypeId::Void: case ParamTypeId::Integer: case ParamTypeId::Real: case ParamTypeId::Complex: // keep original type for void and non-vector - return r; + fTy = r; break; case ParamTypeId::IntegerVector: case ParamTypeId::UnsignedVector: case ParamTypeId::RealVector: // convert to FIR vector type - return fir::VectorType::get(getVecLen(r), r); + fTy = fir::VectorType::get(getVecLen(r), r); break; } + return fTy; } // Generic function type generator that supports most of the function types
Comment Actions
Thanks! Things build for me with this change. Can you please submit an associated fix?