[llvm] 96c335e - [Attributor] Always ensure the correct AAIsDead object is used
Johannes Doerfert via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 11 23:49:19 PST 2023
Author: Johannes Doerfert
Date: 2023-01-11T23:49:09-08:00
New Revision: 96c335e2ccf25091f55561bccc7f2f1a1a5f38a5
URL: https://github.com/llvm/llvm-project/commit/96c335e2ccf25091f55561bccc7f2f1a1a5f38a5
DIFF: https://github.com/llvm/llvm-project/commit/96c335e2ccf25091f55561bccc7f2f1a1a5f38a5.diff
LOG: [Attributor] Always ensure the correct AAIsDead object is used
Since the Attributor::isAssumedDead lookups can jump between functions
we need to potentially replace a given FnLivenessAA for it to be useful.
Added:
Modified:
llvm/lib/Transforms/IPO/Attributor.cpp
llvm/test/Transforms/Attributor/IPConstantProp/openmp_parallel_for.ll
llvm/test/Transforms/Attributor/IPConstantProp/return-constant.ll
llvm/test/Transforms/Attributor/IPConstantProp/return-constants.ll
llvm/test/Transforms/Attributor/align.ll
llvm/test/Transforms/Attributor/assumes_info.ll
llvm/test/Transforms/Attributor/cgscc_bugs.ll
llvm/test/Transforms/Attributor/read_write_returned_arguments_scc.ll
llvm/test/Transforms/Attributor/value-simplify-pointer-info-struct.ll
llvm/test/Transforms/Attributor/value-simplify.ll
llvm/test/Transforms/OpenMP/single_threaded_execution.ll
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/IPO/Attributor.cpp b/llvm/lib/Transforms/IPO/Attributor.cpp
index 2c4fb1218c399..16a1f82b7888f 100644
--- a/llvm/lib/Transforms/IPO/Attributor.cpp
+++ b/llvm/lib/Transforms/IPO/Attributor.cpp
@@ -1356,16 +1356,14 @@ bool Attributor::isAssumedDead(const Instruction &I,
if (ManifestAddedBlocks.contains(I.getParent()))
return false;
- if (!FnLivenessAA)
- FnLivenessAA =
- lookupAAFor<AAIsDead>(IRPosition::function(*I.getFunction(), CBCtx),
- QueryingAA, DepClassTy::NONE);
+ const Function &F = *I.getFunction();
+ if (!FnLivenessAA || FnLivenessAA->getAnchorScope() != &F)
+ FnLivenessAA = &getOrCreateAAFor<AAIsDead>(IRPosition::function(F, CBCtx),
+ QueryingAA, DepClassTy::NONE);
// If we have a context instruction and a liveness AA we use it.
- if (FnLivenessAA &&
- FnLivenessAA->getIRPosition().getAnchorScope() == I.getFunction() &&
- (CheckBBLivenessOnly ? FnLivenessAA->isAssumedDead(I.getParent())
- : FnLivenessAA->isAssumedDead(&I))) {
+ if (CheckBBLivenessOnly ? FnLivenessAA->isAssumedDead(I.getParent())
+ : FnLivenessAA->isAssumedDead(&I)) {
if (QueryingAA)
recordDependence(*FnLivenessAA, *QueryingAA, DepClass);
if (!FnLivenessAA->isKnownDead(&I))
@@ -1436,9 +1434,11 @@ bool Attributor::isAssumedDead(const BasicBlock &BB,
const AbstractAttribute *QueryingAA,
const AAIsDead *FnLivenessAA,
DepClassTy DepClass) {
- if (!FnLivenessAA)
- FnLivenessAA = lookupAAFor<AAIsDead>(IRPosition::function(*BB.getParent()),
- QueryingAA, DepClassTy::NONE);
+ const Function &F = *BB.getParent();
+ if (!FnLivenessAA || FnLivenessAA->getAnchorScope() != &F)
+ FnLivenessAA = &getOrCreateAAFor<AAIsDead>(IRPosition::function(F),
+ QueryingAA, DepClassTy::NONE);
+
if (FnLivenessAA->isAssumedDead(&BB)) {
if (QueryingAA)
recordDependence(*FnLivenessAA, *QueryingAA, DepClass);
diff --git a/llvm/test/Transforms/Attributor/IPConstantProp/openmp_parallel_for.ll b/llvm/test/Transforms/Attributor/IPConstantProp/openmp_parallel_for.ll
index bcfe3658ca159..bd7696682b63c 100644
--- a/llvm/test/Transforms/Attributor/IPConstantProp/openmp_parallel_for.ll
+++ b/llvm/test/Transforms/Attributor/IPConstantProp/openmp_parallel_for.ll
@@ -1,5 +1,5 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=16 -S < %s | FileCheck %s --check-prefixes=CHECK,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=6 -S < %s | FileCheck %s --check-prefixes=CHECK,TUNIT
; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
;
; void bar(int, float, double);
diff --git a/llvm/test/Transforms/Attributor/IPConstantProp/return-constant.ll b/llvm/test/Transforms/Attributor/IPConstantProp/return-constant.ll
index 16bdda2002149..cc3f52311baf5 100644
--- a/llvm/test/Transforms/Attributor/IPConstantProp/return-constant.ll
+++ b/llvm/test/Transforms/Attributor/IPConstantProp/return-constant.ll
@@ -1,5 +1,5 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=2 -S < %s | FileCheck %s --check-prefixes=CHECK,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=5 -S < %s | FileCheck %s --check-prefixes=CHECK,TUNIT
; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
; FIXME: icmp folding is missing
diff --git a/llvm/test/Transforms/Attributor/IPConstantProp/return-constants.ll b/llvm/test/Transforms/Attributor/IPConstantProp/return-constants.ll
index 239bce9be7265..f353517571850 100644
--- a/llvm/test/Transforms/Attributor/IPConstantProp/return-constants.ll
+++ b/llvm/test/Transforms/Attributor/IPConstantProp/return-constants.ll
@@ -1,5 +1,5 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=2 -S < %s | FileCheck %s --check-prefixes=CHECK,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=9 -S < %s | FileCheck %s --check-prefixes=CHECK,TUNIT
; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
;; FIXME: support for extractvalue and insertvalue missing.
diff --git a/llvm/test/Transforms/Attributor/align.ll b/llvm/test/Transforms/Attributor/align.ll
index 90de5defb79f0..7bda25c18c103 100644
--- a/llvm/test/Transforms/Attributor/align.ll
+++ b/llvm/test/Transforms/Attributor/align.ll
@@ -134,14 +134,14 @@ define ptr @test6_2() #0 {
; Function Attrs: nounwind readnone ssp uwtable
define internal ptr @f1(ptr readnone %0) local_unnamed_addr #0 {
-; CHECK: Function Attrs: nofree noinline norecurse nosync nounwind willreturn memory(none) uwtable
-; CHECK-LABEL: define {{[^@]+}}@f1
-; CHECK-SAME: (ptr noalias nofree nonnull readnone align 8 dereferenceable(1) "no-capture-maybe-returned" [[TMP0:%.*]]) local_unnamed_addr #[[ATTR0]] {
-; CHECK-NEXT: br label [[TMP3:%.*]]
-; CHECK: 2:
-; CHECK-NEXT: unreachable
-; CHECK: 3:
-; CHECK-NEXT: ret ptr [[TMP0]]
+; CGSCC: Function Attrs: nofree noinline norecurse nosync nounwind willreturn memory(none) uwtable
+; CGSCC-LABEL: define {{[^@]+}}@f1
+; CGSCC-SAME: () local_unnamed_addr #[[ATTR0]] {
+; CGSCC-NEXT: br label [[TMP2:%.*]]
+; CGSCC: 1:
+; CGSCC-NEXT: unreachable
+; CGSCC: 2:
+; CGSCC-NEXT: ret ptr @a1
;
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %5
@@ -161,17 +161,13 @@ define internal ptr @f2(ptr readnone %0) local_unnamed_addr #0 {
; CGSCC: Function Attrs: noinline nounwind uwtable
; CGSCC-LABEL: define {{[^@]+}}@f2
; CGSCC-SAME: (ptr readnone [[TMP0:%.*]]) local_unnamed_addr #[[ATTR1:[0-9]+]] {
-; CGSCC-NEXT: [[TMP2:%.*]] = icmp eq ptr undef, null
-; CGSCC-NEXT: br i1 [[TMP2]], label [[TMP5:%.*]], label [[TMP3:%.*]]
+; CGSCC-NEXT: unreachable
+; CGSCC: 2:
+; CGSCC-NEXT: unreachable
; CGSCC: 3:
-; CGSCC-NEXT: [[TMP4:%.*]] = tail call ptr @f1(ptr noalias nonnull readnone align 4294967296 dereferenceable(4294967295) undef)
-; CGSCC-NEXT: br label [[TMP7:%.*]]
-; CGSCC: 5:
-; CGSCC-NEXT: [[TMP6:%.*]] = tail call ptr @f3()
-; CGSCC-NEXT: br label [[TMP7]]
-; CGSCC: 7:
-; CGSCC-NEXT: [[TMP8:%.*]] = phi ptr [ [[TMP4]], [[TMP3]] ], [ [[TMP6]], [[TMP5]] ]
-; CGSCC-NEXT: ret ptr [[TMP8]]
+; CGSCC-NEXT: unreachable
+; CGSCC: 4:
+; CGSCC-NEXT: unreachable
;
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
@@ -192,14 +188,14 @@ define internal ptr @f2(ptr readnone %0) local_unnamed_addr #0 {
; Function Attrs: nounwind readnone ssp uwtable
define internal ptr @f3(ptr readnone %0) local_unnamed_addr #0 {
-; CGSCC: Function Attrs: nofree noinline norecurse nosync nounwind willreturn memory(none) uwtable
+; CGSCC: Function Attrs: noinline nounwind uwtable
; CGSCC-LABEL: define {{[^@]+}}@f3
-; CGSCC-SAME: () local_unnamed_addr #[[ATTR0]] {
-; CGSCC-NEXT: br label [[TMP2:%.*]]
-; CGSCC: 1:
+; CGSCC-SAME: (ptr readnone [[TMP0:%.*]]) local_unnamed_addr #[[ATTR1]] {
; CGSCC-NEXT: unreachable
; CGSCC: 2:
-; CGSCC-NEXT: ret ptr @a1
+; CGSCC-NEXT: unreachable
+; CGSCC: 3:
+; CGSCC-NEXT: unreachable
;
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %5
@@ -219,13 +215,12 @@ define align 4 ptr @test7() #0 {
; TUNIT: Function Attrs: nofree noinline norecurse nosync nounwind willreturn memory(none) uwtable
; TUNIT-LABEL: define {{[^@]+}}@test7
; TUNIT-SAME: () #[[ATTR0]] {
-; TUNIT-NEXT: [[C:%.*]] = tail call ptr @f1(ptr noalias nofree noundef nonnull readnone align 8 dereferenceable(1) "no-capture-maybe-returned" @a1) #[[ATTR11:[0-9]+]]
-; TUNIT-NEXT: ret ptr [[C]]
+; TUNIT-NEXT: ret ptr @a1
;
; CGSCC: Function Attrs: nofree noinline nosync nounwind willreturn memory(none) uwtable
; CGSCC-LABEL: define {{[^@]+}}@test7
; CGSCC-SAME: () #[[ATTR2:[0-9]+]] {
-; CGSCC-NEXT: [[C:%.*]] = tail call noundef nonnull align 8 dereferenceable(1) ptr @f1(ptr noalias nofree noundef nonnull readnone align 8 dereferenceable(1) @a1) #[[ATTR13:[0-9]+]]
+; CGSCC-NEXT: [[C:%.*]] = tail call noundef nonnull align 8 dereferenceable(1) ptr @f1() #[[ATTR13:[0-9]+]]
; CGSCC-NEXT: ret ptr [[C]]
;
%c = tail call i8* @f1(i8* align 8 dereferenceable(1) @a1)
@@ -237,12 +232,12 @@ define align 4 ptr @test7() #0 {
define internal ptr @f1b(ptr readnone %0) local_unnamed_addr #0 {
; CGSCC: Function Attrs: nofree noinline norecurse nosync nounwind willreturn memory(none) uwtable
; CGSCC-LABEL: define {{[^@]+}}@f1b
-; CGSCC-SAME: (ptr noalias nofree nonnull readnone align 8 dereferenceable(1) "no-capture-maybe-returned" [[TMP0:%.*]]) local_unnamed_addr #[[ATTR0]] {
-; CGSCC-NEXT: br label [[TMP3:%.*]]
-; CGSCC: 2:
+; CGSCC-SAME: () local_unnamed_addr #[[ATTR0]] {
+; CGSCC-NEXT: br label [[TMP2:%.*]]
+; CGSCC: 1:
; CGSCC-NEXT: unreachable
-; CGSCC: 3:
-; CGSCC-NEXT: ret ptr [[TMP0]]
+; CGSCC: 2:
+; CGSCC-NEXT: ret ptr undef
;
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %5
@@ -264,17 +259,13 @@ define internal ptr @f2b(ptr readnone %0) local_unnamed_addr #0 {
; CGSCC: Function Attrs: noinline nounwind uwtable
; CGSCC-LABEL: define {{[^@]+}}@f2b
; CGSCC-SAME: (ptr readnone [[TMP0:%.*]]) local_unnamed_addr #[[ATTR1]] {
-; CGSCC-NEXT: [[TMP2:%.*]] = icmp eq ptr undef, null
-; CGSCC-NEXT: br i1 [[TMP2]], label [[TMP5:%.*]], label [[TMP3:%.*]]
+; CGSCC-NEXT: unreachable
+; CGSCC: 2:
+; CGSCC-NEXT: unreachable
; CGSCC: 3:
-; CGSCC-NEXT: [[TMP4:%.*]] = tail call ptr @f1b(ptr noalias nonnull readnone align 4294967296 dereferenceable(4294967295) undef)
-; CGSCC-NEXT: br label [[TMP7:%.*]]
-; CGSCC: 5:
-; CGSCC-NEXT: [[TMP6:%.*]] = tail call ptr @f3b()
-; CGSCC-NEXT: br label [[TMP7]]
-; CGSCC: 7:
-; CGSCC-NEXT: [[TMP8:%.*]] = phi ptr [ [[TMP4]], [[TMP3]] ], [ [[TMP6]], [[TMP5]] ]
-; CGSCC-NEXT: ret ptr [[TMP8]]
+; CGSCC-NEXT: unreachable
+; CGSCC: 4:
+; CGSCC-NEXT: unreachable
;
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
@@ -296,14 +287,14 @@ define internal ptr @f2b(ptr readnone %0) local_unnamed_addr #0 {
; Function Attrs: nounwind readnone ssp uwtable
define internal ptr @f3b(ptr readnone %0) local_unnamed_addr #0 {
;
-; CGSCC: Function Attrs: nofree noinline norecurse nosync nounwind willreturn memory(none) uwtable
+; CGSCC: Function Attrs: noinline nounwind uwtable
; CGSCC-LABEL: define {{[^@]+}}@f3b
-; CGSCC-SAME: () local_unnamed_addr #[[ATTR0]] {
-; CGSCC-NEXT: br label [[TMP2:%.*]]
-; CGSCC: 1:
+; CGSCC-SAME: (ptr readnone [[TMP0:%.*]]) local_unnamed_addr #[[ATTR1]] {
; CGSCC-NEXT: unreachable
; CGSCC: 2:
-; CGSCC-NEXT: ret ptr @a1
+; CGSCC-NEXT: unreachable
+; CGSCC: 3:
+; CGSCC-NEXT: unreachable
;
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %5
@@ -936,7 +927,7 @@ define i32 @musttail_caller_1(ptr %p) {
; TUNIT-NEXT: [[C:%.*]] = load i1, ptr @cnd, align 1
; TUNIT-NEXT: br i1 [[C]], label [[MT:%.*]], label [[EXIT:%.*]]
; TUNIT: mt:
-; TUNIT-NEXT: [[V:%.*]] = musttail call i32 @musttail_callee_1(ptr nocapture nofree readonly [[P]]) #[[ATTR12:[0-9]+]]
+; TUNIT-NEXT: [[V:%.*]] = musttail call i32 @musttail_callee_1(ptr nocapture nofree readonly [[P]]) #[[ATTR11:[0-9]+]]
; TUNIT-NEXT: ret i32 [[V]]
; TUNIT: exit:
; TUNIT-NEXT: ret i32 0
@@ -1079,7 +1070,7 @@ define ptr @aligned_8_return_caller(ptr align(16) %a, i1 %c1, i1 %c2) {
; TUNIT: Function Attrs: nofree norecurse nosync nounwind willreturn memory(none)
; TUNIT-LABEL: define {{[^@]+}}@aligned_8_return_caller
; TUNIT-SAME: (ptr nofree readnone align 16 "no-capture-maybe-returned" [[A:%.*]], i1 [[C1:%.*]], i1 [[C2:%.*]]) #[[ATTR9]] {
-; TUNIT-NEXT: [[R:%.*]] = call align 8 ptr @aligned_8_return(ptr noalias nofree readnone align 16 "no-capture-maybe-returned" [[A]], i1 [[C1]], i1 [[C2]]) #[[ATTR12]]
+; TUNIT-NEXT: [[R:%.*]] = call align 8 ptr @aligned_8_return(ptr noalias nofree readnone align 16 "no-capture-maybe-returned" [[A]], i1 [[C1]], i1 [[C2]]) #[[ATTR11]]
; TUNIT-NEXT: ret ptr [[R]]
;
; CGSCC: Function Attrs: nofree nosync nounwind willreturn memory(none)
@@ -1107,8 +1098,7 @@ attributes #2 = { null_pointer_is_valid }
; TUNIT: attributes #[[ATTR8]] = { nofree norecurse nosync nounwind willreturn memory(write) }
; TUNIT: attributes #[[ATTR9]] = { nofree norecurse nosync nounwind willreturn memory(none) }
; TUNIT: attributes #[[ATTR10]] = { nofree norecurse nosync nounwind willreturn memory(read) }
-; TUNIT: attributes #[[ATTR11]] = { nofree norecurse nosync nounwind willreturn }
-; TUNIT: attributes #[[ATTR12]] = { nofree nosync nounwind willreturn }
+; TUNIT: attributes #[[ATTR11]] = { nofree nosync nounwind willreturn }
;.
; CGSCC: attributes #[[ATTR0]] = { nofree noinline norecurse nosync nounwind willreturn memory(none) uwtable }
; CGSCC: attributes #[[ATTR1]] = { noinline nounwind uwtable }
diff --git a/llvm/test/Transforms/Attributor/assumes_info.ll b/llvm/test/Transforms/Attributor/assumes_info.ll
index 55da2d23502f8..61468e9a72cf1 100644
--- a/llvm/test/Transforms/Attributor/assumes_info.ll
+++ b/llvm/test/Transforms/Attributor/assumes_info.ll
@@ -1,5 +1,5 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=2 -S < %s | FileCheck %s --check-prefixes=CHECK,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=3 -S < %s | FileCheck %s --check-prefixes=CHECK,TUNIT
; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
define dso_local void @entry(i1 %cond) #0 {
diff --git a/llvm/test/Transforms/Attributor/cgscc_bugs.ll b/llvm/test/Transforms/Attributor/cgscc_bugs.ll
index 3ddab4a85c7f3..e93c0b9d307d3 100644
--- a/llvm/test/Transforms/Attributor/cgscc_bugs.ll
+++ b/llvm/test/Transforms/Attributor/cgscc_bugs.ll
@@ -1,5 +1,5 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=6 -S < %s | FileCheck %s --check-prefixes=CHECK,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=5 -S < %s | FileCheck %s --check-prefixes=CHECK,TUNIT
; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
diff --git a/llvm/test/Transforms/Attributor/read_write_returned_arguments_scc.ll b/llvm/test/Transforms/Attributor/read_write_returned_arguments_scc.ll
index 6d15def7825c7..14c5b296070ce 100644
--- a/llvm/test/Transforms/Attributor/read_write_returned_arguments_scc.ll
+++ b/llvm/test/Transforms/Attributor/read_write_returned_arguments_scc.ll
@@ -1,5 +1,5 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=7 -S < %s | FileCheck %s --check-prefixes=CHECK,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=11 -S < %s | FileCheck %s --check-prefixes=CHECK,TUNIT
; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
;
diff --git a/llvm/test/Transforms/Attributor/value-simplify-pointer-info-struct.ll b/llvm/test/Transforms/Attributor/value-simplify-pointer-info-struct.ll
index b6901950b3bca..cbc2ab34f2cb2 100644
--- a/llvm/test/Transforms/Attributor/value-simplify-pointer-info-struct.ll
+++ b/llvm/test/Transforms/Attributor/value-simplify-pointer-info-struct.ll
@@ -1,5 +1,5 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=13 -S < %s | FileCheck %s --check-prefixes=CHECK,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=15 -S < %s | FileCheck %s --check-prefixes=CHECK,TUNIT
; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
;
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
diff --git a/llvm/test/Transforms/Attributor/value-simplify.ll b/llvm/test/Transforms/Attributor/value-simplify.ll
index 8461b5c89a610..5471c8964bdb5 100644
--- a/llvm/test/Transforms/Attributor/value-simplify.ll
+++ b/llvm/test/Transforms/Attributor/value-simplify.ll
@@ -1,5 +1,5 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=13 -S < %s | FileCheck %s --check-prefixes=CHECK,TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=14 -S < %s | FileCheck %s --check-prefixes=CHECK,TUNIT
; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
diff --git a/llvm/test/Transforms/OpenMP/single_threaded_execution.ll b/llvm/test/Transforms/OpenMP/single_threaded_execution.ll
index fb523215e7d43..06433454be0b4 100644
--- a/llvm/test/Transforms/OpenMP/single_threaded_execution.ll
+++ b/llvm/test/Transforms/OpenMP/single_threaded_execution.ll
@@ -27,6 +27,20 @@ if.end:
ret void
}
+; CHECK: [openmp-opt] Basic block @foo entry is executed by a single thread.
+; Function Attrs: noinline
+define internal void @foo() {
+entry:
+ ret void
+}
+
+; CHECK: [openmp-opt] Basic block @bar.internalized entry is executed by a single thread.
+; Function Attrs: noinline
+define void @bar() {
+entry:
+ ret void
+}
+
; REMARKS: remark: single_threaded_execution.c:1:0: Could not internalize function. Some optimizations may not be possible.
; REMARKS-NOT: remark: single_threaded_execution.c:1:0: Could not internalize function. Some optimizations may not be possible.
@@ -51,13 +65,6 @@ if.end:
ret void
}
-; CHECK: [openmp-opt] Basic block @foo entry is executed by a single thread.
-; Function Attrs: noinline
-define internal void @foo() {
-entry:
- ret void
-}
-
; CHECK-NOT: [openmp-opt] Basic block @amdgcn entry is executed by a single thread.
; CHECK-DAG: [openmp-opt] Basic block @amdgcn if.then is executed by a single thread.
; CHECK-NOT: [openmp-opt] Basic block @amdgcn if.end is executed by a single thread.
@@ -79,13 +86,6 @@ if.end:
ret void
}
-; CHECK: [openmp-opt] Basic block @bar.internalized entry is executed by a single thread.
-; Function Attrs: noinline
-define void @bar() {
-entry:
- ret void
-}
-
; CHECK-NOT: [openmp-opt] Basic block @baz entry is executed by a single thread.
; Function Attrs: noinline
define weak void @baz() !dbg !8 {
More information about the llvm-commits
mailing list