diff --git a/flang/lib/Optimizer/Passes/Pipelines.cpp b/flang/lib/Optimizer/Passes/Pipelines.cpp index 98f947a1f635d..6cc3290ff5cc2 100644 --- a/flang/lib/Optimizer/Passes/Pipelines.cpp +++ b/flang/lib/Optimizer/Passes/Pipelines.cpp @@ -14,7 +14,7 @@ /// Force setting the no-alias attribute on fuction arguments when possible. static llvm::cl::opt forceNoAlias("force-no-alias", llvm::cl::Hidden, - llvm::cl::init(false)); + llvm::cl::init(true)); namespace fir { diff --git a/flang/test/Driver/tco-test-gen.fir b/flang/test/Driver/tco-test-gen.fir index 38d4e50ecf3aa..0bc8ed6ae4a11 100644 --- a/flang/test/Driver/tco-test-gen.fir +++ b/flang/test/Driver/tco-test-gen.fir @@ -1,8 +1,8 @@ -// RUN: tco -emit-final-mlir %s | FileCheck %s --check-prefixes=CHECK,AA,CMPLX -// RUN: tco -emit-final-mlir -enable-aa=false %s | FileCheck %s --check-prefixes=CHECK,NOAA,CMPLX -// RUN: tco -emit-final-mlir -simplify-mlir %s | FileCheck %s --check-prefixes=CHECK,AA,SIMPLE -// RUN: tco -emit-final-mlir -enable-aa=false -simplify-mlir %s | FileCheck %s --check-prefixes=CHECK,NOAA,SIMPLE -// RUN: tco -test-gen %s | FileCheck %s --check-prefixes=CHECK,NOAA,SIMPLE +// RUN: tco -emit-final-mlir --force-no-alias=false %s | FileCheck %s --check-prefixes=CHECK,AA,CMPLX +// RUN: tco -emit-final-mlir --force-no-alias=false -enable-aa=false %s | FileCheck %s --check-prefixes=CHECK,NOAA,CMPLX +// RUN: tco -emit-final-mlir --force-no-alias=false -simplify-mlir %s | FileCheck %s --check-prefixes=CHECK,AA,SIMPLE +// RUN: tco -emit-final-mlir --force-no-alias=false -enable-aa=false -simplify-mlir %s | FileCheck %s --check-prefixes=CHECK,NOAA,SIMPLE +// RUN: tco -test-gen --force-no-alias=false %s | FileCheck %s --check-prefixes=CHECK,NOAA,SIMPLE // Just a dummy function that exhibits all of the things we want to turn on and off func.func @_QPtest(%arg0: !fir.ref {fir.bindc_name = "num"}, %arg1: !fir.ref {fir.bindc_name = "lb"}, %arg2: !fir.ref {fir.bindc_name = "ub"}, %arg3: !fir.ref {fir.bindc_name = "step"}) { diff --git a/flang/test/Integration/cold_array_repacking.f90 b/flang/test/Integration/cold_array_repacking.f90 index 11b7d8c21b67f..2f5fe2bba21e7 100644 --- a/flang/test/Integration/cold_array_repacking.f90 +++ b/flang/test/Integration/cold_array_repacking.f90 @@ -1,6 +1,6 @@ ! Check that the branch weights used by the array repacking ! are propagated all the way to LLVM IR: -! RUN: %flang_fc1 -frepack-arrays -emit-llvm %s -o - | FileCheck %s +! RUN: %flang_fc1 -frepack-arrays -mmlir --force-no-alias=false -emit-llvm %s -o - | FileCheck %s ! CHECK-LABEL: define void @test_( ! CHECK-SAME: ptr [[TMP0:%.*]]) diff --git a/flang/test/Integration/complex-div-to-llvm-kind10.f90 b/flang/test/Integration/complex-div-to-llvm-kind10.f90 index 04d1f7ed9b024..5f7b070030f4b 100644 --- a/flang/test/Integration/complex-div-to-llvm-kind10.f90 +++ b/flang/test/Integration/complex-div-to-llvm-kind10.f90 @@ -1,8 +1,8 @@ ! Test lowering complex division to llvm ir according to options ! REQUIRES: target=x86_64{{.*}} -! RUN: %flang -fcomplex-arithmetic=improved -S -emit-llvm %s -o - | FileCheck %s --check-prefixes=CHECK,IMPRVD -! RUN: %flang -fcomplex-arithmetic=basic -S -emit-llvm %s -o - | FileCheck %s --check-prefixes=CHECK,BASIC +! RUN: %flang -fcomplex-arithmetic=improved -mmlir --force-no-alias=false -S -emit-llvm %s -o - | FileCheck %s --check-prefixes=CHECK,IMPRVD +! RUN: %flang -fcomplex-arithmetic=basic -mmlir --force-no-alias=false -S -emit-llvm %s -o - | FileCheck %s --check-prefixes=CHECK,BASIC ! CHECK-LABEL: @div_test_extended diff --git a/flang/test/Integration/complex-div-to-llvm.f90 b/flang/test/Integration/complex-div-to-llvm.f90 index 01782a565f24c..51342da3a2cee 100644 --- a/flang/test/Integration/complex-div-to-llvm.f90 +++ b/flang/test/Integration/complex-div-to-llvm.f90 @@ -1,7 +1,7 @@ ! Test lowering complex division to llvm ir according to options -! RUN: %flang -fcomplex-arithmetic=improved -S -emit-llvm %s -o - | FileCheck %s --check-prefixes=CHECK,IMPRVD -! RUN: %flang -fcomplex-arithmetic=basic -S -emit-llvm %s -o - | FileCheck %s --check-prefixes=CHECK,BASIC +! RUN: %flang -fcomplex-arithmetic=improved -mmlir --force-no-alias=false -S -emit-llvm %s -o - | FileCheck %s --check-prefixes=CHECK,IMPRVD +! RUN: %flang -fcomplex-arithmetic=basic -mmlir --force-no-alias=false -S -emit-llvm %s -o - | FileCheck %s --check-prefixes=CHECK,BASIC ! CHECK-LABEL: @div_test_half diff --git a/flang/test/Lower/OpenMP/target-data-skip-mapper-calls.f90 b/flang/test/Lower/OpenMP/target-data-skip-mapper-calls.f90 index f1a150d5dfabc..63ec8651e35b8 100644 --- a/flang/test/Lower/OpenMP/target-data-skip-mapper-calls.f90 +++ b/flang/test/Lower/OpenMP/target-data-skip-mapper-calls.f90 @@ -1,5 +1,5 @@ -!RUN: %flang_fc1 -emit-llvm -fopenmp %s -o - | FileCheck %s --check-prefix=NORT -!RUN: %flang_fc1 -emit-llvm -fopenmp %s -o - | FileCheck %s --check-prefix=LLVM +!RUN: %flang_fc1 -emit-llvm -fopenmp -mmlir --force-no-alias=false %s -o - | FileCheck %s --check-prefix=NORT +!RUN: %flang_fc1 -emit-llvm -fopenmp -mmlir --force-no-alias=false %s -o - | FileCheck %s --check-prefix=LLVM !Make sure that there are no calls to the mapper. !NORT-NOT: call{{.*}}__tgt_target_data_begin_mapper