[flang-commits] [flang] 6654578 - [LLVM][AArch64] Enable SVEIntrinsicOpts at all optimisation levels.
Paul Walker via flang-commits
flang-commits at lists.llvm.org
Wed Oct 9 07:25:31 PDT 2024
Author: Paul Walker
Date: 2024-10-09T14:17:39Z
New Revision: 665457815f11118f7e755a471f33606c8562a4be
URL: https://github.com/llvm/llvm-project/commit/665457815f11118f7e755a471f33606c8562a4be
DIFF: https://github.com/llvm/llvm-project/commit/665457815f11118f7e755a471f33606c8562a4be.diff
LOG: [LLVM][AArch64] Enable SVEIntrinsicOpts at all optimisation levels.
Added:
Modified:
flang/test/Driver/default-backend-pipelines.f90
llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
Removed:
################################################################################
diff --git a/flang/test/Driver/default-backend-pipelines.f90 b/flang/test/Driver/default-backend-pipelines.f90
index e6910c170f1179..12b929e9fa40f6 100644
--- a/flang/test/Driver/default-backend-pipelines.f90
+++ b/flang/test/Driver/default-backend-pipelines.f90
@@ -5,9 +5,9 @@
! RUN: %flang_fc1 -S -O2 %s -triple aarch64-unknown-linux-gnu -mllvm -debug-pass=Structure -o /dev/null 2>&1 | FileCheck %s --check-prefix=CHECK-O2
! RUN: %flang_fc1 -S -O3 %s -triple aarch64-unknown-linux-gnu -mllvm -debug-pass=Structure -o /dev/null 2>&1 | FileCheck %s --check-prefix=CHECK-O3
-! CHECK-O2-NOT: SVE intrinsics optimizations
+! CHECK-O2-NOT: Optimize selects
-! CHECK-O3: SVE intrinsics optimizations
+! CHECK-O3: Optimize selects
subroutine simple_loop
integer :: i
diff --git a/llvm/lib/Target/AArch64/AArch64TargetMachine.cpp b/llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
index 9f96f6c5e83ec4..7b0ae23358673e 100644
--- a/llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
+++ b/llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
@@ -588,7 +588,7 @@ void AArch64PassConfig::addIRPasses() {
// Expand any SVE vector library calls that we can't code generate directly.
if (EnableSVEIntrinsicOpts &&
- TM->getOptLevel() == CodeGenOptLevel::Aggressive)
+ TM->getOptLevel() != CodeGenOptLevel::None)
addPass(createSVEIntrinsicOptsPass());
// Cmpxchg instructions are often used with a subsequent comparison to
More information about the flang-commits
mailing list