[flang-commits] [clang] [flang] [flang] Enable alias tags pass by default (PR #73111)
Tom Eccles via flang-commits
flang-commits at lists.llvm.org
Mon Nov 27 03:12:45 PST 2023
================
@@ -2,12 +2,25 @@
! See flang/test/Fir/tbaa-codegen.fir for a test that the output is correct
! RUN: %flang -c -emit-llvm -falias-analysis %s -o - | llvm-dis | FileCheck %s --check-prefix=CHECK-AA --check-prefix=CHECK-ALL
-! RUN: %flang -c -emit-llvm -falias-analysis -fno-alias-analysis %s -o - | llvm-dis | FileCheck %s --check-prefix=CHECK-NOAA --check-prefix=CHECK-ALL
+! RUN: %flang -c -emit-llvm -Ofast %s -o - | llvm-dis | FileCheck %s --check-prefix=CHECK-AA --check-prefix=CHECK-ALL
+! RUN: %flang -c -emit-llvm -O3 %s -o - | llvm-dis | FileCheck %s --check-prefix=CHECK-AA --check-prefix=CHECK-ALL
+! RUN: %flang -c -emit-llvm -O2 %s -o - | llvm-dis | FileCheck %s --check-prefix=CHECK-AA --check-prefix=CHECK-ALL
+! RUN: %flang -c -emit-llvm -O1 %s -o - | llvm-dis | FileCheck %s --check-prefix=CHECK-AA --check-prefix=CHECK-ALL
+
+! RUN: %flang -c -emit-llvm -O0 %s -o - | llvm-dis | FileCheck %s --check-prefix=CHECK-NOAA --check-prefix=CHECK-ALL
+! RUN: %flang -c -emit-llvm -Ofast -fno-alias-analysis %s -o - | llvm-dis | FileCheck %s --check-prefix=CHECK-NOAA --check-prefix=CHECK-ALL
----------------
tblah wrote:
I have added a test in this case. `-fno-alias-analysis` takes precedence over `-Ofast` no matter their order.
I don't think there is anything in clang that is equivalent to `-f[no-]alias-analysis`. These flags were added to flang so we could upstream alias analysis without enabling it by default. I would like to keep them after enabling by default in case alias analysis leads to any regressions.
https://github.com/llvm/llvm-project/pull/73111
More information about the flang-commits
mailing list