================ @@ -336,6 +348,52 @@ class OpenACCClauseCIREmitter final return clauseNotImplemented(clause); } } + + void VisitCollapseClause(const OpenACCCollapseClause &clause) { + if constexpr (isOneOfTypes<OpTy, mlir::acc::LoopOp>) { + llvm::APInt value = + clause.getIntExpr()->EvaluateKnownConstInt(cgf.cgm.getASTContext()); + + if (value.getBitWidth() != 64) + value = value.sext(64); ---------------- razvanlupusoru wrote:
The OpenACC spec does not provide exact clarification on what "integer expression" is - except in one spot in the spec: ``` 5348 Async-argument – an async-argument is a nonnegative scalar integer expression (int for C or C++, integer for Fortran) ``` It seems the intent is that they are 32-bit integers. https://github.com/llvm/llvm-project/pull/138576 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits