Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
4d80e0c
[flang][OpenMP] Add missing forward declarations and includes (#164860)
kparzysz Oct 23, 2025
c20835b
[ARM] Fix a warning
kazutakahirata Oct 23, 2025
b08bbe5
[ARM][KFCI] Fix unused variable for #163698 (#164857)
googlewalt Oct 23, 2025
e665f24
[mlir] Delete unroll-full option for Affine/SCF unroll pass (#164658)
linuxlonelyeagle Oct 23, 2025
3f27f57
[ADT] Use `adl_begin`/`end` with `to_vector` functions (#164823)
kuhar Oct 23, 2025
0198e8f
[lld][WebAssembly] Honor command line reloc model during LTO (#164838)
sbc100 Oct 23, 2025
2bb4226
[LLVM][Intrinsics] Print note if manual name matches default name (#1…
jurahul Oct 23, 2025
b2c8b07
[flang][OpenMP] Rename some AST classes to follow spec naming, NFC (#…
kparzysz Oct 23, 2025
f11899f
[ThinLTO][WPD] Simplify check for local summary for efficiency (NFCI)…
teresajohnson Oct 23, 2025
a909ec6
[ThinLTO][WPD] LICM a loop invariant check (#164862)
teresajohnson Oct 23, 2025
c745f74
[FlowSensitive] [StatusOr] [7/N] Support StatusOr::emplace
fmayer Oct 23, 2025
ad75b3b
[RISCV] Add AltFmtType = IS_NOT_ALTFMT to SF_VFNRCLIP_X(U)_F_QF. (#16…
topperc Oct 23, 2025
d87200e
[X86] Add atomic vector tests for unaligned >1 sizes. (#148896)
jofrn Oct 23, 2025
1c30038
[flang][mlir] add missing type conversion when lowering atomiccas (#1…
atmnp Oct 23, 2025
f899893
[AMDGPU][NFC] Cleanly make 32-bit abs legal (#164837)
LU-JOHN Oct 23, 2025
eaedab2
[MLIR] Apply clang-tidy fixes for misc-use-internal-linkage in Serial…
joker-eph Aug 21, 2025
2b808c0
[CI][Github] Install Clang in Windows container (#164519)
cmtice Oct 23, 2025
4456afc
Revert "[lldb] fix lldb-server test failures on windows (#164843)"
adrian-prantl Oct 23, 2025
aac036a
Revert "[lldb] update lldb-server platform help parsing (#162730)"
adrian-prantl Oct 23, 2025
910cf51
[gn build] Port d8d80b659a2b
llvmgnsyncbot Oct 23, 2025
c97256d
[MIR2Vec] Add MIR support to triplet generator script (#164332)
svkeerthy Oct 23, 2025
d478737
[lldb][debugserver] fix typeo in SME ZA register
jasonmolenda Oct 23, 2025
4ec5852
[LV] Add tests for narrowing interleave groups with multiple blocks.
fhahn Oct 23, 2025
752e345
merge main into amd-staging
ronlieb Oct 23, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/workflows/containers/github-action-ci-windows/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,45 @@ RUN powershell -Command \
Add-Type -AssemblyName System.IO.Compression.FileSystem ; \
[System.IO.Compression.ZipFile]::ExtractToDirectory('actions-runner-win.zip', $PWD) ;\
rm actions-runner-win.zip

# Set the LLVM_VERSION environment variable
ENV LLVM_VERSION=21.1.2

# Download and extract Clang compiler.
# Create directories, download, extract, and clean up all in one layer
RUN powershell -Command \
# --- Setup directories --- \
Write-Host "Creating directories..."; \
New-Item -Path "C:\temp-download" -ItemType "Directory" -Force ; \
New-Item -Path "C:\xz-utils" -ItemType "Directory" -Force ; \
New-Item -Path "C:\clang" -ItemType "Directory" -Force ; \
# --- 1. Download and extract xz --- \
Set-Location C:\temp-download ; \
Invoke-WebRequest -Uri "http://github.com/tukaani-project/xz/releases/download/v5.8.1/xz-5.8.1-windows.zip" -OutFile "xz.zip"; \
(Get-FileHash -Path "C:\temp-download\xz.zip" -Algorithm MD5).Hash -eq 'c3c69fdce3e825cc0b76123b36b0bcc2' ; \
Add-Type -AssemblyName "System.IO.Compression.FileSystem"; \
[System.IO.Compression.ZipFile]::ExtractToDirectory('C:\temp-download\xz.zip', 'C:\xz-utils'); \
# --- 2. Download and decompress Clang --- \
Invoke-WebRequest -Uri "http://github.com/llvm/llvm-project/releases/download/llvmorg-21.1.2/clang+llvm-21.1.2-x86_64-pc-windows-msvc.tar.xz" -OutFile "clang+llvm-21.1.2-x86_64-pc-windows-msvc.tar.xz" ; \
(Get-FileHash -Path "C:\temp-download\clang+llvm-21.1.2-x86_64-pc-windows-msvc.tar.xz" -Algorithm MD5).Hash -eq '0ae1d3effd9ab9d323f7fa595777f0a2' ; \
C:\xz-utils\bin_x86-64\xz.exe -d -qq clang+llvm-21.1.2-x86_64-pc-windows-msvc.tar.xz ; \
# --- 3. Extract clang --- \
C:\Windows\System32\tar.exe -xf clang+llvm-21.1.2-x86_64-pc-windows-msvc.tar -C C:\clang ; \
# --- 4. Clean up --- \
Set-Location C:\ ; \
Remove-Item C:\temp-download -Recurse -Force; \
Remove-Item C:\xz-utils -Recurse -Force; \
# -- 5. Shorten path to clang files & remove unnecessary files -- \
Set-Location C:\clang ; \
Rename-Item -Path "C:\clang\clang+llvm-21.1.2-x86_64-pc-windows-msvc" -NewName "C:\clang\clang-msvc" ; \
Set-Location C:\clang\clang-msvc ; \
Remove-Item -Path C:\clang\clang-msvc\libexec -Recurse -Force ; \
Remove-Item -Path C:\clang\clang-msvc\share -Recurse -Force ; \
Rename-Item -Path "C:\clang\clang-msvc\bin" -NewName "C:\clang\clang-msvc\bin-full" ; \
New-Item -Path "C:\clang\clang-msvc\bin" -ItemType Directory -Force ; \
Set-Location C:\clang\clang-msvc\bin ; \
Copy-Item -Path C:\clang\clang-msvc\bin-full\*.dll -Destination C:\clang\clang-msvc\bin\. ; \
Copy-Item -Path C:\clang\clang-msvc\bin-full\clang-cl.exe -Destination C:\clang\clang-msvc\bin\. ; \
Copy-Item -Path C:\clang\clang-msvc\bin-full\lld-link.exe -Destination C:\clang\clang-msvc\bin\. ; \
Set-Location C:\clang\clang-msvc ; \
Remove-Item -Path C:\clang\clang-msvc\bin-full -Recurse -Force ;
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,18 @@ static void transferNotOkStatusCall(const CallExpr *Expr,
State.Env.assume(A.makeNot(OkVal.formula()));
}

static void transferEmplaceCall(const CXXMemberCallExpr *Expr,
const MatchFinder::MatchResult &,
LatticeTransferState &State) {
RecordStorageLocation *StatusOrLoc =
getImplicitObjectLocation(*Expr, State.Env);
if (StatusOrLoc == nullptr)
return;

auto &OkVal = valForOk(locForStatus(*StatusOrLoc), State.Env);
State.Env.assume(OkVal.formula());
}

CFGMatchSwitch<LatticeTransferState>
buildTransferMatchSwitch(ASTContext &Ctx,
CFGMatchSwitchBuilder<LatticeTransferState> Builder) {
Expand Down Expand Up @@ -559,6 +571,8 @@ buildTransferMatchSwitch(ASTContext &Ctx,
})
.CaseOfCFGStmt<CallExpr>(isOkStatusCall(), transferOkStatusCall)
.CaseOfCFGStmt<CallExpr>(isNotOkStatusCall(), transferNotOkStatusCall)
.CaseOfCFGStmt<CXXMemberCallExpr>(isStatusOrMemberCallWithName("emplace"),
transferEmplaceCall)
.Build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2928,6 +2928,53 @@ TEST_P(UncheckedStatusOrAccessModelTest, PointerEqualityCheck) {
)cc");
}

TEST_P(UncheckedStatusOrAccessModelTest, Emplace) {
ExpectDiagnosticsFor(R"cc(
#include "unchecked_statusor_access_test_defs.h"

struct Foo {
Foo(int);
};

void target(absl::StatusOr<Foo> sor, int value) {
sor.emplace(value);
sor.value();
}
)cc");
ExpectDiagnosticsFor(R"cc(
#include "unchecked_statusor_access_test_defs.h"

struct Foo {
Foo(std::initializer_list<int>, int);
};

void target(absl::StatusOr<Foo> sor, int value) {
sor.emplace({1, 2, 3}, value);
sor.value();
}
)cc");
ExpectDiagnosticsFor(R"cc(
#include "unchecked_statusor_access_test_defs.h"

void target() {
STATUSOR_INT sor;
bool sor_ok = sor.ok();
if (!sor_ok)
sor.emplace(42);
sor.value();
}
)cc");
ExpectDiagnosticsFor(R"cc(
#include "unchecked_statusor_access_test_defs.h"

void target(bool b) {
STATUSOR_INT sor;
if (b) sor.emplace(42);
if (b) sor.value();
}
)cc");
}

} // namespace

std::string
Expand Down
2 changes: 1 addition & 1 deletion flang/examples/FeatureList/FeatureList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,7 @@ struct NodeVisitor {
READ_FEATURE(OmpBlockConstruct)
READ_FEATURE(OmpClause)
READ_FEATURE(OmpClauseList)
READ_FEATURE(OmpCombinerExpression)
READ_FEATURE(OmpDefaultClause)
READ_FEATURE(OmpDefaultClause::DataSharingAttribute)
READ_FEATURE(OmpDefaultmapClause)
Expand Down Expand Up @@ -496,7 +497,6 @@ struct NodeVisitor {
READ_FEATURE(OmpProcBindClause::AffinityPolicy)
READ_FEATURE(OmpReductionClause)
READ_FEATURE(OmpInReductionClause)
READ_FEATURE(OmpReductionCombiner)
READ_FEATURE(OmpInitializerClause)
READ_FEATURE(OmpReductionIdentifier)
READ_FEATURE(OmpAllocateClause)
Expand Down
4 changes: 2 additions & 2 deletions flang/include/flang/Parser/dump-parse-tree.h
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,7 @@ class ParseTreeDumper {
NODE(parser, OmpClauseList)
NODE(parser, OmpCloseModifier)
NODE_ENUM(OmpCloseModifier, Value)
NODE(parser, OmpCombinerExpression)
NODE(parser, OmpContainsClause)
NODE(parser, OmpContextSelectorSpecification)
NODE(parser, OmpDeclareVariantDirective)
Expand Down Expand Up @@ -655,7 +656,6 @@ class ParseTreeDumper {
NODE_ENUM(OmpProcBindClause, AffinityPolicy)
NODE(parser, OmpReductionClause)
NODE(OmpReductionClause, Modifier)
NODE(parser, OmpReductionCombiner)
NODE(parser, OmpReductionIdentifier)
NODE(parser, OmpReductionModifier)
NODE_ENUM(OmpReductionModifier, Value)
Expand Down Expand Up @@ -693,8 +693,8 @@ class ParseTreeDumper {
NODE(parser, OmpTraitSetSelectorName)
NODE_ENUM(OmpTraitSetSelectorName, Value)
NODE(parser, OmpTransparentClause)
NODE(parser, OmpTypeName)
NODE(parser, OmpTypeNameList)
NODE(parser, OmpTypeSpecifier)
NODE(parser, OmpUnifiedAddressClause)
NODE(parser, OmpUnifiedSharedMemoryClause)
NODE(parser, OmpUpdateClause)
Expand Down
25 changes: 13 additions & 12 deletions flang/include/flang/Parser/parse-tree.h
Original file line number Diff line number Diff line change
Expand Up @@ -3502,6 +3502,16 @@ struct OmpDirectiveName {
llvm::omp::Directive v{llvm::omp::Directive::OMPD_unknown};
};

// type-name list item
struct OmpTypeName {
UNION_CLASS_BOILERPLATE(OmpTypeName);
std::variant<TypeSpec, DeclarationTypeSpec> u;
};

struct OmpTypeNameList {
WRAPPER_CLASS_BOILERPLATE(OmpTypeNameList, std::list<OmpTypeName>);
};

// 2.1 Directives or clauses may accept a list or extended-list.
// A list item is a variable, array section or common block name (enclosed
// in slashes). An extended list item is a list item or a procedure Name.
Expand Down Expand Up @@ -3539,21 +3549,12 @@ struct OmpReductionIdentifier {
// combiner-expression -> // since 4.5
// assignment-statement |
// function-reference
struct OmpReductionCombiner {
UNION_CLASS_BOILERPLATE(OmpReductionCombiner);
struct OmpCombinerExpression {
UNION_CLASS_BOILERPLATE(OmpCombinerExpression);
std::variant<AssignmentStmt, FunctionReference> u;
};

inline namespace arguments {
struct OmpTypeSpecifier {
UNION_CLASS_BOILERPLATE(OmpTypeSpecifier);
std::variant<TypeSpec, DeclarationTypeSpec> u;
};

struct OmpTypeNameList {
WRAPPER_CLASS_BOILERPLATE(OmpTypeNameList, std::list<OmpTypeSpecifier>);
};

struct OmpLocator {
UNION_CLASS_BOILERPLATE(OmpLocator);
std::variant<OmpObject, FunctionReference> u;
Expand Down Expand Up @@ -3596,7 +3597,7 @@ struct OmpMapperSpecifier {
struct OmpReductionSpecifier {
TUPLE_CLASS_BOILERPLATE(OmpReductionSpecifier);
std::tuple<OmpReductionIdentifier, OmpTypeNameList,
std::optional<OmpReductionCombiner>>
std::optional<OmpCombinerExpression>>
t;
};

Expand Down
1 change: 1 addition & 0 deletions flang/include/flang/Semantics/openmp-utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include <utility>

namespace Fortran::semantics {
class Scope;
class SemanticsContext;
class Symbol;

Expand Down
4 changes: 3 additions & 1 deletion flang/lib/Optimizer/Builder/IntrinsicCall.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3106,7 +3106,9 @@ IntrinsicLibrary::genAtomicCas(mlir::Type resultType,
.getResult(0);
auto cmpxchg = mlir::LLVM::AtomicCmpXchgOp::create(
builder, loc, address, arg1, arg2, successOrdering, failureOrdering);
return mlir::LLVM::ExtractValueOp::create(builder, loc, cmpxchg, 1);
mlir::Value boolResult =
mlir::LLVM::ExtractValueOp::create(builder, loc, cmpxchg, 1);
return builder.createConvert(loc, resultType, boolResult);
}

mlir::Value IntrinsicLibrary::genAtomicDec(mlir::Type resultType,
Expand Down
12 changes: 6 additions & 6 deletions flang/lib/Parser/openmp-parsers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -367,17 +367,17 @@ struct OmpArgumentListParser {
};

TYPE_PARSER( //
construct<OmpTypeSpecifier>(Parser<DeclarationTypeSpec>{}) ||
construct<OmpTypeSpecifier>(Parser<TypeSpec>{}))
construct<OmpTypeName>(Parser<DeclarationTypeSpec>{}) ||
construct<OmpTypeName>(Parser<TypeSpec>{}))

// 2.15.3.6 REDUCTION (reduction-identifier: variable-name-list)
TYPE_PARSER(construct<OmpReductionIdentifier>(Parser<DefinedOperator>{}) ||
construct<OmpReductionIdentifier>(Parser<ProcedureDesignator>{}))

TYPE_PARSER(construct<OmpReductionSpecifier>( //
Parser<OmpReductionIdentifier>{},
":"_tok >> nonemptyList(Parser<OmpTypeSpecifier>{}),
maybe(":"_tok >> Parser<OmpReductionCombiner>{})))
":"_tok >> nonemptyList(Parser<OmpTypeName>{}),
maybe(":"_tok >> Parser<OmpCombinerExpression>{})))

// --- Parsers for context traits -------------------------------------

Expand Down Expand Up @@ -1832,8 +1832,8 @@ TYPE_PARSER(sourced(construct<OpenMPDeclareMapperConstruct>(
IsDirective(llvm::omp::Directive::OMPD_declare_mapper)) >=
Parser<OmpDirectiveSpecification>{})))

TYPE_PARSER(construct<OmpReductionCombiner>(Parser<AssignmentStmt>{}) ||
construct<OmpReductionCombiner>(Parser<FunctionReference>{}))
TYPE_PARSER(construct<OmpCombinerExpression>(Parser<AssignmentStmt>{}) ||
construct<OmpCombinerExpression>(Parser<FunctionReference>{}))

TYPE_PARSER(sourced(construct<OpenMPCriticalConstruct>(
OmpBlockConstructParser{llvm::omp::Directive::OMPD_critical})))
Expand Down
4 changes: 2 additions & 2 deletions flang/lib/Parser/unparse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2111,7 +2111,7 @@ class UnparseVisitor {
Walk(std::get<OmpReductionIdentifier>(x.t));
Put(":");
Walk(std::get<OmpTypeNameList>(x.t));
Walk(": ", std::get<std::optional<OmpReductionCombiner>>(x.t));
Walk(": ", std::get<std::optional<OmpCombinerExpression>>(x.t));
}
void Unparse(const llvm::omp::Directive &x) {
unsigned ompVersion{langOpts_.OpenMPVersion};
Expand Down Expand Up @@ -2519,7 +2519,7 @@ class UnparseVisitor {
Walk(x.u);
}
}
void Unparse(const OmpReductionCombiner &x) {
void Unparse(const OmpCombinerExpression &x) {
// Don't let the visitor go to the normal AssignmentStmt Unparse function,
// it adds an extra newline that we don't want.
if (const auto *assignment{std::get_if<AssignmentStmt>(&x.u)}) {
Expand Down
3 changes: 2 additions & 1 deletion flang/lib/Semantics/openmp-utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
#include "flang/Parser/openmp-utils.h"
#include "flang/Parser/parse-tree.h"
#include "flang/Semantics/expression.h"
#include "flang/Semantics/scope.h"
#include "flang/Semantics/semantics.h"
#include "flang/Semantics/symbol.h"

#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/STLExtras.h"
Expand Down Expand Up @@ -505,5 +507,4 @@ bool IsStrictlyStructuredBlock(const parser::Block &block) {
return false;
}
}

} // namespace Fortran::semantics::omp
6 changes: 3 additions & 3 deletions flang/lib/Semantics/resolve-names.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1772,11 +1772,11 @@ class OmpVisitor : public virtual DeclarationVisitor {
messageHandler().set_currStmtSource(std::nullopt);
}

bool Pre(const parser::OmpTypeSpecifier &x) {
bool Pre(const parser::OmpTypeName &x) {
BeginDeclTypeSpec();
return true;
}
void Post(const parser::OmpTypeSpecifier &x) { //
void Post(const parser::OmpTypeName &x) { //
EndDeclTypeSpec();
}

Expand Down Expand Up @@ -2007,7 +2007,7 @@ void OmpVisitor::ProcessReductionSpecifier(
}
}
EndDeclTypeSpec();
Walk(std::get<std::optional<parser::OmpReductionCombiner>>(spec.t));
Walk(std::get<std::optional<parser::OmpCombinerExpression>>(spec.t));
Walk(clauses);
PopScope();
}
Expand Down
13 changes: 13 additions & 0 deletions flang/test/Lower/CUDA/cuda-device-proc.cuf
Original file line number Diff line number Diff line change
Expand Up @@ -479,3 +479,16 @@ end subroutine

! CHECK-LABEL: func.func @_QPtest_bulk_s2g
! CHECL: nvvm.cp.async.bulk.global.shared.cta %{{.*}}, %{{.*}}, %{{.*}} : <1>, <3>

attributes(device) subroutine testAtomicCasLoop(aa, n)
integer :: a
do while (atomiccas(a, 0, 1) == 1)
end do
end subroutine

! CHECK-LABEL: func.func @_QPtestatomiccasloop
! CHECK: %[[CMP_XCHG:.*]] = llvm.cmpxchg %15, %c0_i32, %c1_i32 acq_rel monotonic : !llvm.ptr, i32
! CHECK: %[[CMP_XCHG_EV:.*]] = llvm.extractvalue %[[CMP_XCHG]][1] : !llvm.struct<(i32, i1)>
! CHECK: %[[CASTED_CMP_XCHG_EV:.*]] = fir.convert %[[CMP_XCHG_EV]] : (i1) -> i32
! CHECK: %{{.*}} = arith.constant 1 : i32
! CHECK: %19 = arith.cmpi eq, %[[CASTED_CMP_XCHG_EV]], %{{.*}} : i32
16 changes: 8 additions & 8 deletions flang/test/Parser/OpenMP/declare-reduction-multi.f90
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ program omp_examples
!PARSE-TREE: | OmpDirectiveName -> llvm::omp::Directive = declare reduction
!PARSE-TREE: | OmpArgumentList -> OmpArgument -> OmpReductionSpecifier
!PARSE-TREE: | | OmpReductionIdentifier -> DefinedOperator -> IntrinsicOperator = Add
!PARSE-TREE: | | OmpTypeNameList -> OmpTypeSpecifier -> TypeSpec -> DerivedTypeSpec
!PARSE-TREE: | | OmpTypeNameList -> OmpTypeName -> TypeSpec -> DerivedTypeSpec
!PARSE-TREE: | | | Name = 'tt'
!PARSE-TREE: | | OmpReductionCombiner -> AssignmentStmt = 'omp_out%r=omp_out%r+omp_in%r'
!PARSE-TREE: | | OmpCombinerExpression -> AssignmentStmt = 'omp_out%r=omp_out%r+omp_in%r'
!PARSE-TREE: | OmpClauseList -> OmpClause -> Initializer -> OmpInitializerClause -> AssignmentStmt = 'omp_priv%r=0._4'

!$omp declare reduction(*:tt:omp_out%r = omp_out%r * omp_in%r) initializer(omp_priv%r = 1)
Expand All @@ -44,9 +44,9 @@ program omp_examples
!PARSE-TREE: | OmpDirectiveName -> llvm::omp::Directive = declare reduction
!PARSE-TREE: | OmpArgumentList -> OmpArgument -> OmpReductionSpecifier
!PARSE-TREE: | | OmpReductionIdentifier -> DefinedOperator -> IntrinsicOperator = Multiply
!PARSE-TREE: | | OmpTypeNameList -> OmpTypeSpecifier -> TypeSpec -> DerivedTypeSpec
!PARSE-TREE: | | OmpTypeNameList -> OmpTypeName -> TypeSpec -> DerivedTypeSpec
!PARSE-TREE: | | | Name = 'tt'
!PARSE-TREE: | | OmpReductionCombiner -> AssignmentStmt = 'omp_out%r=omp_out%r*omp_in%r'
!PARSE-TREE: | | OmpCombinerExpression -> AssignmentStmt = 'omp_out%r=omp_out%r*omp_in%r'
!PARSE-TREE: | OmpClauseList -> OmpClause -> Initializer -> OmpInitializerClause -> AssignmentStmt = 'omp_priv%r=1._4'

!$omp declare reduction(max:tt:omp_out = mymax(omp_out, omp_in)) initializer(omp_priv%r = 0)
Expand All @@ -56,9 +56,9 @@ program omp_examples
!PARSE-TREE: | OmpDirectiveName -> llvm::omp::Directive = declare reduction
!PARSE-TREE: | OmpArgumentList -> OmpArgument -> OmpReductionSpecifier
!PARSE-TREE: | | OmpReductionIdentifier -> ProcedureDesignator -> Name = 'max'
!PARSE-TREE: | | OmpTypeNameList -> OmpTypeSpecifier -> TypeSpec -> DerivedTypeSpec
!PARSE-TREE: | | OmpTypeNameList -> OmpTypeName -> TypeSpec -> DerivedTypeSpec
!PARSE-TREE: | | | Name = 'tt'
!PARSE-TREE: | | OmpReductionCombiner -> AssignmentStmt = 'omp_out=mymax(omp_out,omp_in)'
!PARSE-TREE: | | OmpCombinerExpression -> AssignmentStmt = 'omp_out=mymax(omp_out,omp_in)'
!PARSE-TREE: | OmpClauseList -> OmpClause -> Initializer -> OmpInitializerClause -> AssignmentStmt = 'omp_priv%r=0._4'

!$omp declare reduction(min:tt:omp_out%r = min(omp_out%r, omp_in%r)) initializer(omp_priv%r = 1)
Expand All @@ -68,9 +68,9 @@ program omp_examples
!PARSE-TREE: | OmpDirectiveName -> llvm::omp::Directive = declare reduction
!PARSE-TREE: | OmpArgumentList -> OmpArgument -> OmpReductionSpecifier
!PARSE-TREE: | | OmpReductionIdentifier -> ProcedureDesignator -> Name = 'min'
!PARSE-TREE: | | OmpTypeNameList -> OmpTypeSpecifier -> TypeSpec -> DerivedTypeSpec
!PARSE-TREE: | | OmpTypeNameList -> OmpTypeName -> TypeSpec -> DerivedTypeSpec
!PARSE-TREE: | | | Name = 'tt'
!PARSE-TREE: | | OmpReductionCombiner -> AssignmentStmt = 'omp_out%r=min(omp_out%r,omp_in%r)'
!PARSE-TREE: | | OmpCombinerExpression -> AssignmentStmt = 'omp_out%r=min(omp_out%r,omp_in%r)'
!PARSE-TREE: | OmpClauseList -> OmpClause -> Initializer -> OmpInitializerClause -> AssignmentStmt = 'omp_priv%r=1._4'

call random_number(values%r)
Expand Down
Loading