Skip to content

Commit 50f1423

Browse files
author
git apple-llvm automerger
committed
Merge commit '3de3347d4928' from llvm.org/release/21.x into stable/21.x
2 parents 813acbd + 3de3347 commit 50f1423

File tree

2 files changed

+5
-11
lines changed

2 files changed

+5
-11
lines changed

clang/lib/Driver/ToolChains/CommonArgs.cpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3266,14 +3266,8 @@ void tools::handleVectorizeSLPArgs(const ArgList &Args,
32663266

32673267
void tools::handleInterchangeLoopsArgs(const ArgList &Args,
32683268
ArgStringList &CmdArgs) {
3269-
// FIXME: instead of relying on shouldEnableVectorizerAtOLevel, we may want to
3270-
// implement a separate function to infer loop interchange from opt level.
3271-
// For now, enable loop-interchange at the same opt levels as loop-vectorize.
3272-
bool EnableInterchange = shouldEnableVectorizerAtOLevel(Args, false);
3273-
OptSpecifier InterchangeAliasOption =
3274-
EnableInterchange ? options::OPT_O_Group : options::OPT_floop_interchange;
3275-
if (Args.hasFlag(options::OPT_floop_interchange, InterchangeAliasOption,
3276-
options::OPT_fno_loop_interchange, EnableInterchange))
3269+
if (Args.hasFlag(options::OPT_floop_interchange,
3270+
options::OPT_fno_loop_interchange, false))
32773271
CmdArgs.push_back("-floop-interchange");
32783272
}
32793273

flang/test/Driver/loop-interchange.f90

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
! RUN: %flang -### -S -fno-loop-interchange %s 2>&1 | FileCheck -check-prefix=CHECK-NO-LOOP-INTERCHANGE %s
33
! RUN: %flang -### -S -O0 %s 2>&1 | FileCheck -check-prefix=CHECK-NO-LOOP-INTERCHANGE %s
44
! RUN: %flang -### -S -O1 %s 2>&1 | FileCheck -check-prefix=CHECK-NO-LOOP-INTERCHANGE %s
5-
! RUN: %flang -### -S -O2 %s 2>&1 | FileCheck -check-prefix=CHECK-LOOP-INTERCHANGE %s
6-
! RUN: %flang -### -S -O3 %s 2>&1 | FileCheck -check-prefix=CHECK-LOOP-INTERCHANGE %s
7-
! RUN: %flang -### -S -Os %s 2>&1 | FileCheck -check-prefix=CHECK-LOOP-INTERCHANGE %s
5+
! RUN: %flang -### -S -O2 %s 2>&1 | FileCheck -check-prefix=CHECK-NO-LOOP-INTERCHANGE %s
6+
! RUN: %flang -### -S -O3 %s 2>&1 | FileCheck -check-prefix=CHECK-NO-LOOP-INTERCHANGE %s
7+
! RUN: %flang -### -S -Os %s 2>&1 | FileCheck -check-prefix=CHECK-NO-LOOP-INTERCHANGE %s
88
! RUN: %flang -### -S -Oz %s 2>&1 | FileCheck -check-prefix=CHECK-NO-LOOP-INTERCHANGE %s
99
! CHECK-LOOP-INTERCHANGE: "-floop-interchange"
1010
! CHECK-NO-LOOP-INTERCHANGE-NOT: "-floop-interchange"

0 commit comments

Comments
 (0)